diff options
author | claudio <claudio@openbsd.org> | 2015-12-05 13:19:32 +0000 |
---|---|---|
committer | claudio <claudio@openbsd.org> | 2015-12-05 13:19:32 +0000 |
commit | 1f82c02d178597ef5080a9610badd3504bca5640 (patch) | |
tree | f55183b1b58b606291755ba25483b8b134bac7a1 /usr.sbin/npppctl | |
parent | EAGAIN handling for imsg_read. OK henning@ benno@ (diff) | |
download | wireguard-openbsd-1f82c02d178597ef5080a9610badd3504bca5640.tar.xz wireguard-openbsd-1f82c02d178597ef5080a9610badd3504bca5640.zip |
EAGAIN handling for imsg_read. OK henning@ benno@
Diffstat (limited to 'usr.sbin/npppctl')
-rw-r--r-- | usr.sbin/npppctl/npppctl.c | 5 |
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); |