ignore sigchld when shutting down the supervised process

We need to do this to skip the zombie state for the child process since
we are not easily able to wait() for it.
This commit is contained in:
William Hubbs 2017-09-18 16:59:18 -05:00
parent b58194ef63
commit 1cac8b080c

View File

@ -753,6 +753,7 @@ int main(int argc, char **argv)
while (!exiting) {
wait(&i);
if (exiting) {
signal_setup(SIGCHLD, SIG_IGN);
syslog(LOG_INFO, "stopping %s, pid %d", exec, child_pid);
nkilled = run_stop_schedule(applet, exec, NULL, child_pid,
0, false, false, true);