Can Matlab receive signals from linux? (e.g. SIGIO)

Does Matlab have the ability to catch signals from Linux?

For example, a signal SIGIO (29)may be sent to a process with a lease in a file when another process tries to open this file. From my testing, when I try kill -s 29 pid, where pidis the process id of the running Matlab window, the matlab process is killed. Similarly, kill -SIGIO pidcauses the matlab process to die.

Is there any way to catch them (i.e. not die Matlab)?

+3
source share
1 answer

You can write a MEX module in C that processes this signal, and possibly sets a flag somewhere that can be requested later from Matlab.

0
source

Source: https://habr.com/ru/post/1725084/


All Articles