diff options
| author | Roy Marples <roy@marples.name> | 2007-04-03 07:03:04 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2007-04-03 07:03:04 +0000 |
| commit | 522a128c7236125dd42840ea3e588bcf5b224f84 (patch) | |
| tree | 096bd989f57a9afe3161e32cddb1ad407a76df9f /signals.c | |
| parent | b2e9b3c410a0384a24d230091dfdbbf6b17e9d86 (diff) | |
| download | dhcpcd-522a128c7236125dd42840ea3e588bcf5b224f84.tar.xz | |
You can now build dhcpcd without support for writing ntp, nis and info files
which makes the binary a few k smaller.
Support OpenNTP as well as NTP.
Re-work the state engine a little, so we renew and rebind correctly.
Subsequent debug options stop dhcpcd from daemonising.
Diffstat (limited to 'signals.c')
| -rw-r--r-- | signals.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -21,6 +21,7 @@ #include <sys/socket.h> #include <sys/select.h> +#include <sys/wait.h> #include <errno.h> #include <fcntl.h> #include <signal.h> @@ -34,6 +35,15 @@ static int signal_pipe[2]; static void signal_handler (int sig) { + /* 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; + } + if (send (signal_pipe[1], &sig, sizeof (sig), MSG_DONTWAIT) < 0) logger (LOG_ERR, "Could not send signal: %s", strerror (errno)); } |
