]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Don't raise signals on child exits.
authorRoy Marples <roy@marples.name>
Mon, 21 Jan 2008 15:12:51 +0000 (15:12 +0000)
committerRoy Marples <roy@marples.name>
Mon, 21 Jan 2008 15:12:51 +0000 (15:12 +0000)
signal.c

index 3d02f6a5f86e84bd7c153e184f90b0a7923f6864..a1f8bff44c2cb9be992f476c1dbe1cda4bb397a4 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -28,7 +28,6 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/select.h>
-#include <sys/wait.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <signal.h>
@@ -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));
 }