SystemExec try SIGINT before SIGKILL
Even though SIGINT is intended to be sent from terminals only, it is more successful at terminating various child processes than closing stdin and sending SIGTERM.
This commit is contained in:
@@ -682,6 +682,13 @@ SystemExec::terminate ()
|
||||
wait(WNOHANG);
|
||||
}
|
||||
|
||||
if (pid) {
|
||||
::kill(pid, SIGINT);
|
||||
::usleep(250000);
|
||||
sched_yield();
|
||||
wait(WNOHANG);
|
||||
}
|
||||
|
||||
/* if pid is non-zero, the child task is STILL executing after being
|
||||
* sent SIGTERM. Act tough ... send SIGKILL
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user