From 1cac8b080c16f9aab19c7a3ae1ca155c20dfa14d Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Mon, 18 Sep 2017 16:59:18 -0500 Subject: [PATCH] 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. --- src/rc/supervise-daemon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rc/supervise-daemon.c b/src/rc/supervise-daemon.c index 09db1912..a781ad9d 100644 --- a/src/rc/supervise-daemon.c +++ b/src/rc/supervise-daemon.c @@ -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);