diff options
author | yasuoka <yasuoka@openbsd.org> | 2014-07-22 02:02:59 +0000 |
---|---|---|
committer | yasuoka <yasuoka@openbsd.org> | 2014-07-22 02:02:59 +0000 |
commit | 5d71a92083c3c77ca0df3caf1eceee5c023dcfad (patch) | |
tree | 4302c0b88a11c996f61932f14a4f8e29840f5446 /usr.sbin/npppctl | |
parent | change the test for still-open Unix domain sockets to be robust against (diff) | |
download | wireguard-openbsd-5d71a92083c3c77ca0df3caf1eceee5c023dcfad.tar.xz wireguard-openbsd-5d71a92083c3c77ca0df3caf1eceee5c023dcfad.zip |
Handle msgbuf_write() returning EAGAIN.
from krw
Diffstat (limited to 'usr.sbin/npppctl')
-rw-r--r-- | usr.sbin/npppctl/npppctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/npppctl/npppctl.c b/usr.sbin/npppctl/npppctl.c index 27d0489b641..6f75d825c19 100644 --- a/usr.sbin/npppctl/npppctl.c +++ b/usr.sbin/npppctl/npppctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: npppctl.c,v 1.3 2014/04/03 07:10:18 yasuoka Exp $ */ +/* $OpenBSD: npppctl.c,v 1.4 2014/07/22 02:02:59 yasuoka Exp $ */ /* * Copyright (c) 2012 Internet Initiative Japan Inc. @@ -511,7 +511,7 @@ imsg_wait_command_completion(void) int n; while (ctl_ibuf.w.queued) - if (msgbuf_write(&ctl_ibuf.w) < -1) + if (msgbuf_write(&ctl_ibuf.w) <= 0 && errno != EAGAIN) return (-1); do { if ((n = imsg_get(&ctl_ibuf, &ctl_imsg)) == -1) |