summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2013-11-16 19:34:44 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2013-11-16 19:34:44 +0000
commit18c836f748834ee888f372be25ef67cf2c0138b3 (patch)
treed411d539c9de6e5fa48b47436ba658d7c1a162be
parent431731812874189793edce7ce2b5f568e44fc441 (diff)
Fix msgbuf_write() usage.
-rw-r--r--sbin/dhclient/dispatch.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/dhclient/dispatch.c b/sbin/dhclient/dispatch.c
index 958b0b9fcff..0221edfb5d7 100644
--- a/sbin/dhclient/dispatch.c
+++ b/sbin/dhclient/dispatch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dispatch.c,v 1.82 2013/11/11 21:00:01 krw Exp $ */
+/* $OpenBSD: dispatch.c,v 1.83 2013/11/16 19:34:43 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -208,7 +208,8 @@ another:
routehandler();
}
if (fds[2].revents & POLLOUT) {
- if (msgbuf_write(&unpriv_ibuf->w) == -1) {
+ if (msgbuf_write(&unpriv_ibuf->w) <= 0 &&
+ errno != EAGAIN) {
warning("pipe write error to [priv]");
quit = INTERNALSIG;
continue;