summaryrefslogtreecommitdiff
path: root/usr.sbin/npppctl
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2015-12-05 13:19:33 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2015-12-05 13:19:33 +0000
commit0648ea46221b09f66f978f53ba414674e8eaa362 (patch)
treef0706728f9d4e85487b2c870c4399f8e812a8536 /usr.sbin/npppctl
parent1478b73ab35c053d01a295a6665054dd97d685d8 (diff)
EAGAIN handling for imsg_read. OK henning@ benno@
Diffstat (limited to 'usr.sbin/npppctl')
-rw-r--r--usr.sbin/npppctl/npppctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/npppctl/npppctl.c b/usr.sbin/npppctl/npppctl.c
index 3ee8af9c8c1..ef6aaacf058 100644
--- a/usr.sbin/npppctl/npppctl.c
+++ b/usr.sbin/npppctl/npppctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: npppctl.c,v 1.5 2015/01/19 01:48:57 deraadt Exp $ */
+/* $OpenBSD: npppctl.c,v 1.6 2015/12/05 13:19:32 claudio Exp $ */
/*
* Copyright (c) 2012 Internet Initiative Japan Inc.
@@ -519,7 +519,8 @@ imsg_wait_command_completion(void)
return (-1);
if (n != 0)
break;
- if ((n = imsg_read(&ctl_ibuf)) == -1 || n == 0)
+ if (((n = imsg_read(&ctl_ibuf)) == -1 && errno != EAGAIN) ||
+ n == 0)
return (-1);
} while (1);