summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2014-02-13 00:24:14 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2014-02-13 00:24:14 +0000
commitb136e2b956b98395479a2d9ffd6e7b10d50bf12a (patch)
treeadcb957ca875ed1334c749cbbd83e5506dfaa98e
parent105a4461278a569c72fdeccca6e6fdf9bb7f78fb (diff)
Hard looping on EAGAIN is bad. Just fall out to outer event loop
when EAGAIN is encountered while trying to flush messages.
-rw-r--r--sbin/dhclient/kroute.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/dhclient/kroute.c b/sbin/dhclient/kroute.c
index 4b3930de435..d0e5adca96a 100644
--- a/sbin/dhclient/kroute.c
+++ b/sbin/dhclient/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.63 2014/02/09 20:45:56 krw Exp $ */
+/* $OpenBSD: kroute.c,v 1.64 2014/02/13 00:24:13 krw Exp $ */
/*
* Copyright 2012 Kenneth R Westerback <krw@openbsd.org>
@@ -692,7 +692,7 @@ flush_unpriv_ibuf(const char *who)
while (unpriv_ibuf->w.queued) {
if (msgbuf_write(&unpriv_ibuf->w) <= 0) {
if (errno == EAGAIN)
- continue;
+ break;
if (quit == 0)
quit = INTERNALSIG;
if (errno != EPIPE && errno != 0)