diff options
| author | 2019-01-19 02:20:25 +0000 | |
|---|---|---|
| committer | 2019-01-19 02:20:25 +0000 | |
| commit | 2f40e6495e08fa52c228366ec9fe2391374e0e6b (patch) | |
| tree | b37cd77955d6659232ed2882841c05e68c66c138 /sbin/dhclient/dispatch.c | |
| parent | Move boottime into the timehands. (diff) | |
| download | wireguard-openbsd-2f40e6495e08fa52c228366ec9fe2391374e0e6b.tar.xz wireguard-openbsd-2f40e6495e08fa52c228366ec9fe2391374e0e6b.zip | |
'quit' no longer holds signals, so strsignal(quit) is both pointless
and now in unreachable code. Simplifies dispatch loops by eliminating
most uses of INTERNALSIG.
Diffstat (limited to 'sbin/dhclient/dispatch.c')
| -rw-r--r-- | sbin/dhclient/dispatch.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/sbin/dhclient/dispatch.c b/sbin/dhclient/dispatch.c index 4248aa85130..c2fe0befce1 100644 --- a/sbin/dhclient/dispatch.c +++ b/sbin/dhclient/dispatch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dispatch.c,v 1.159 2019/01/18 01:38:58 krw Exp $ */ +/* $OpenBSD: dispatch.c,v 1.160 2019/01/19 02:20:25 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -146,24 +146,20 @@ dispatch(struct interface_info *ifi, int routefd) continue; log_warn("%s: poll(bpffd, routefd, unpriv_ibuf)", log_procname); - quit = INTERNALSIG; - continue; + break; } if ((fds[0].revents & (POLLERR | POLLHUP | POLLNVAL)) != 0) { log_debug("%s: bpffd: ERR|HUP|NVAL", log_procname); - quit = INTERNALSIG; - continue; + break; } if ((fds[1].revents & (POLLERR | POLLHUP | POLLNVAL)) != 0) { log_debug("%s: routefd: ERR|HUP|NVAL", log_procname); - quit = INTERNALSIG; - continue; + break; } if ((fds[2].revents & (POLLERR | POLLHUP | POLLNVAL)) != 0) { log_debug("%s: unpriv_ibuf: ERR|HUP|NVAL", log_procname); - quit = INTERNALSIG; - continue; + break; } if (nfds == 0) @@ -176,11 +172,8 @@ dispatch(struct interface_info *ifi, int routefd) if ((fds[2].revents & POLLOUT) != 0) flush_unpriv_ibuf(); if ((fds[2].revents & POLLIN) != 0) - quit = INTERNALSIG; + break; } - - if (quit != INTERNALSIG && quit != SIGHUP) - fatalx("%s", strsignal(quit)); } void |
