Mercurial > hg > dhcpcd
changeset 297:197a1ef06532 draft
Don't raise signals on child exits.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Mon, 21 Jan 2008 15:12:51 +0000 |
| parents | d2eb4610ac12 |
| children | d73dd36a3948 |
| files | signal.c |
| diffstat | 1 files changed, 3 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/signal.c Mon Jan 21 15:12:31 2008 +0000 +++ b/signal.c Mon Jan 21 15:12:51 2008 +0000 @@ -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 @@ { 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 @@ 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)); }
