From: Roy Marples Date: Wed, 7 Nov 2007 10:42:30 +0000 (+0000) Subject: Actually read the signal from the buffer X-Git-Tag: v3.2.3~167 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee3485fe1026fd9a28c71977a71fa2589fb8ae35;p=thirdparty%2Fdhcpcd.git Actually read the signal from the buffer --- diff --git a/signals.c b/signals.c index bb36cf6c..81829c9b 100644 --- a/signals.c +++ b/signals.c @@ -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))