commit:     038cea416c0a4cda83872733ab660cf0bb2b5eaf
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Mon Sep 18 21:59:18 2017 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Sep 18 22:06:17 2017 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=038cea41

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);

Reply via email to