diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2013-02-17 17:36:32 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2013-02-17 17:36:32 +0000 |
commit | 548214598c765bcb20ea07675bb5d05788e57874 (patch) | |
tree | c9fda9f57827c0aaca60c34b548c6523d2b8b36e /sbin | |
parent | f7e7109b180491daa989293551a22ffadaab6191 (diff) |
Using the value SIGQUIT to cause the dispatch loops to exit produced
universal revulsion and no little confusion. #define our own value,
currently INT_MAX, which should not overlap any likely signal value.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/dhclient/dhcpd.h | 3 | ||||
-rw-r--r-- | sbin/dhclient/dispatch.c | 14 | ||||
-rw-r--r-- | sbin/dhclient/kroute.c | 4 |
3 files changed, 11 insertions, 10 deletions
diff --git a/sbin/dhclient/dhcpd.h b/sbin/dhclient/dhcpd.h index 1dc85e63927..4da743c1de6 100644 --- a/sbin/dhclient/dhcpd.h +++ b/sbin/dhclient/dhcpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcpd.h,v 1.109 2013/02/14 20:39:46 krw Exp $ */ +/* $OpenBSD: dhcpd.h,v 1.110 2013/02/17 17:36:31 krw Exp $ */ /* * Copyright (c) 2004 Henning Brauer <henning@openbsd.org> @@ -72,6 +72,7 @@ #define LOCAL_PORT 68 #define REMOTE_PORT 67 +#define INTERNALSIG INT_MAX struct option { char *name; diff --git a/sbin/dhclient/dispatch.c b/sbin/dhclient/dispatch.c index 65664feab5c..c62f9a4a3a9 100644 --- a/sbin/dhclient/dispatch.c +++ b/sbin/dhclient/dispatch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dispatch.c,v 1.73 2013/02/17 17:04:41 krw Exp $ */ +/* $OpenBSD: dispatch.c,v 1.74 2013/02/17 17:36:31 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -119,7 +119,7 @@ dispatch(void) another: if (!ifi) { warning("No interfaces available"); - quit = SIGQUIT; + quit = INTERNALSIG; continue; } @@ -127,7 +127,7 @@ another: warning("Interface %s:" " rdomain changed out from under us", ifi->name); - quit = SIGQUIT; + quit = INTERNALSIG; continue; } @@ -155,7 +155,7 @@ another: /* Set up the descriptors to be polled. */ if (!ifi || ifi->rfdesc == -1) { warning("No live interface to poll on"); - quit = SIGQUIT; + quit = INTERNALSIG; continue; } @@ -176,7 +176,7 @@ another: continue; } else { warning("poll: %s", strerror(errno)); - quit = SIGQUIT; + quit = INTERNALSIG; continue; } } @@ -192,13 +192,13 @@ another: if (fds[2].revents & POLLOUT) { if (msgbuf_write(&unpriv_ibuf->w) == -1) { warning("pipe write error to [priv]"); - quit = SIGQUIT; + quit = INTERNALSIG; continue; } } if ((fds[2].revents & (POLLIN | POLLHUP))) { /* Pipe to [priv] closed. Assume it emitted error. */ - quit = SIGQUIT; + quit = INTERNALSIG; continue; } } diff --git a/sbin/dhclient/kroute.c b/sbin/dhclient/kroute.c index 8680b1e6928..36eab14e4e0 100644 --- a/sbin/dhclient/kroute.c +++ b/sbin/dhclient/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.34 2013/02/17 17:04:41 krw Exp $ */ +/* $OpenBSD: kroute.c,v 1.35 2013/02/17 17:36:31 krw Exp $ */ /* * Copyright 2012 Kenneth R Westerback <krw@openbsd.org> @@ -533,7 +533,7 @@ priv_add_address(struct imsg_add_address *imsg) if (imsg->addr.s_addr == INADDR_ANY) { /* Notification that the active_addr has been deleted. */ active_addr.s_addr = INADDR_ANY; - quit = INT_MAX; + quit = INTERNALSIG; return; } |