How can I process an external System Signal in a Matlab executable

5 visualizaciones (últimos 30 días)
Thomas Pfau
Thomas Pfau el 4 de Nov. de 2014
Comentada: Ken el 4 de Sept. de 2017
Hello,
I'm creating a Matlab executable via mcc to run a tool on a cluster (in a linux environment). I have a situation, where it is necessary to be able to checkpoint my computation and graceously exit when a given external signal is received. I saw that there is the onCleanup function, which works nicely within Matlab. However when the code is compiled as an executable onCleanup does not react to any external signals. Regardless on whether I send a signal to the process via kill or just press ctrl+c in the terminal running the code it just terminates without executing the cleanup. Unfortunately I haven't found any other method to handle external events (maybe I just looked in the wrong places).
Could anyone tell me whether there is a way to handle external signals in a matlab executable?

Respuestas (0)

Categorías

Más información sobre MATLAB Compiler en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by