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/dhclient.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/dhclient.c')
| -rw-r--r-- | sbin/dhclient/dhclient.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 63b578a6635..2a15dd9cc73 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.614 2019/01/19 01:53:08 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.615 2019/01/19 02:20:25 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -2221,25 +2221,20 @@ fork_privchld(struct interface_info *ifi, int fd, int fd2) if (errno == EINTR) continue; log_warn("%s: poll(priv_ibuf)", log_procname); - quit = INTERNALSIG; - continue; - } - if ((pfd[0].revents & (POLLERR | POLLHUP | POLLNVAL)) != 0) { - quit = INTERNALSIG; - continue; + break; } + if ((pfd[0].revents & (POLLERR | POLLHUP | POLLNVAL)) != 0) + break; if (nfds == 0 || (pfd[0].revents & POLLIN) == 0) continue; if ((n = imsg_read(priv_ibuf)) == -1 && errno != EAGAIN) { log_warn("%s: imsg_read(priv_ibuf)", log_procname); - quit = INTERNALSIG; - continue; + break; } if (n == 0) { /* Connection closed - other end should log message. */ - quit = INTERNALSIG; - continue; + break; } dispatch_imsg(ifi->name, ifi->rdomain, ioctlfd, routefd, @@ -2258,9 +2253,6 @@ fork_privchld(struct interface_info *ifi, int fd, int fd2) fatal("execvp(%s)", saved_argv[0]); } - if (quit != INTERNALSIG) - fatalx("%s", strsignal(quit)); - exit(1); } |
