Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
Thomas Pfau
Thomas Pfau le 4 Nov 2014
Commenté : Ken le 4 Sep 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?
  1 commentaire
Ken
Ken le 4 Sep 2017
I have the exact same issue. Is there any practical solution?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur MATLAB Compiler dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by