Skip to content
Prev 59951 / 63424 Next

User interrupts parallel excution. Why it works or why not?

Hi Jiefei,

when you run the cluster "automatically" in your terminal and pres 
Ctrl-C in Unix, both the master and the worker processes get the SIGINT 
signal, because they belong to the same foreground process group. So you 
are directly interrupting also the worker process.

When you run the cluster "manually", that is the master in one terminal 
window and the worker in another, they are in different process groups 
and if you pres Ctrl-C in the terminal running the master, only the 
master will receive SIGINT signal, not the worker.

If you wanted to read the sources more, look for SIGINT handling in R, 
the onintrEx() function, etc. A good source on signal handling is e.g. 
http://www.linusakesson.net/programming/tty/

Best
Tomas
On 7/20/21 9:55 AM, Jiefei Wang wrote: