diff options
| author | Roy Marples <roy@marples.name> | 2007-11-07 10:42:30 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2007-11-07 10:42:30 +0000 |
| commit | ee3485fe1026fd9a28c71977a71fa2589fb8ae35 (patch) | |
| tree | aa84ba81e7bfae1e3be24ce221f3df78c5dec934 /signals.c | |
| parent | de8a9d9887e862c9fefc9b6ff3520c572a57b924 (diff) | |
| download | dhcpcd-ee3485fe1026fd9a28c71977a71fa2589fb8ae35.tar.xz | |
Actually read the signal from the buffer
Diffstat (limited to 'signals.c')
| -rw-r--r-- | signals.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -112,6 +112,9 @@ int signal_read (fd_set *rfds) memset (buf, 0, buflen); bytes = read (signal_pipe[0], buf, buflen); + if (bytes >= sizeof (sig)) + memcpy (&sig, buf, sizeof (sig)); + /* We need to clear us from rfds if nothing left in the buffer * in case we are called many times */ if (bytes == sizeof (sig)) |
