views:

130

answers:

1

does matlab have the capability to catch signals from linux? for example, the signal SIGIO (29) can be sent to a process with a lease on a file when another process attempts to open that file. from my testing, when I try kill -s 29 pid, where pid is the process ID of a running matlab window, the matlab process is killed. similarly,kill -SIGIO pid causes the matlab process to die.

is there some way to catch these (i.e. not have matlab die)?

edit: add question mark to mark a question (duh. I'm totally california, you know.)

A: 

You can write a MEX module in C that handles this signal, and maybe sets a flag somewhere that can be queried later from Matlab.

Amnon

related questions