From: Roy Marples Date: Mon, 21 Jan 2008 15:12:51 +0000 (+0000) Subject: Don't raise signals on child exits. X-Git-Tag: v3.2.3~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62207ad3ee5ecd282d7f22fe88ee17dc882169de;p=thirdparty%2Fdhcpcd.git Don't raise signals on child exits. --- diff --git a/signal.c b/signal.c index 3d02f6a5..a1f8bff4 100644 --- a/signal.c +++ b/signal.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -45,14 +44,6 @@ static void signal_handler (int sig) { unsigned int i = 0; - /* Silently ignore this signal and wait for it. This stops zombies. - We do this here instead of client.c so that we don't spam the log - file with "waiting on select messages" */ - if (sig == SIGCHLD) { - wait (0); - return; - } - /* Add a signal to our stack */ while (signals[i]) i++; @@ -140,7 +131,9 @@ void signal_setup (void) signal (SIGALRM, signal_handler); signal (SIGTERM, signal_handler); signal (SIGINT, signal_handler); - signal (SIGCHLD, signal_handler); + + /* We don't care about our childs exit codes right now */ + signal (SIGCHLD, SIG_IGN); memset (signals, 0, sizeof (signals)); }