Mercurial > hg > dhcpcd
changeset 4185:70572d63d4f2 draft
eloop: set _eloop in signal setup rather than start
This fixes a potential issue where a signal could be received
before eloop_start is called.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Wed, 15 Nov 2017 15:14:24 +0000 |
| parents | 548f1baa118d |
| children | cf951e13d6fc |
| files | src/eloop.c |
| diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/eloop.c Wed Nov 15 14:51:48 2017 +0000 +++ b/src/eloop.c Wed Nov 15 15:14:24 2017 +0000 @@ -785,6 +785,8 @@ return -1; #ifndef HAVE_KQUEUE + _eloop = eloop; + memset(&sa, 0, sizeof(sa)); sa.sa_sigaction = eloop_signal3; sa.sa_flags = SA_SIGINFO; @@ -876,8 +878,6 @@ #endif #ifndef HAVE_KQUEUE int timeout; - - _eloop = eloop; #endif assert(eloop != NULL);
