artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
beaf8b1
)
Handle imsg_read() EAGAIN like the man page code example.
author
rzalamena
<rzalamena@openbsd.org>
Mon, 8 Aug 2016 16:49:17 +0000
(16:49 +0000)
committer
rzalamena
<rzalamena@openbsd.org>
Mon, 8 Aug 2016 16:49:17 +0000
(16:49 +0000)
ok reyk@
usr.sbin/switchd/control.c
patch
|
blob
|
history
diff --git
a/usr.sbin/switchd/control.c
b/usr.sbin/switchd/control.c
index
b5ee43c
..
0cf1422
100644
(file)
--- a/
usr.sbin/switchd/control.c
+++ b/
usr.sbin/switchd/control.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: control.c,v 1.
2 2016/07/20 21:01:06 reyk Exp $
*/
+/* $OpenBSD: control.c,v 1.
3 2016/08/08 16:49:17 rzalamena Exp $
*/
/*
* Copyright (c) 2010-2016 Reyk Floeter <reyk@openbsd.org>
@@
-309,7
+309,8
@@
control_dispatch_imsg(int fd, short event, void *arg)
}
if (event & EV_READ) {
- if ((n = imsg_read(&c->iev.ibuf)) == -1 || n == 0) {
+ if (((n = imsg_read(&c->iev.ibuf)) == -1 && errno != EAGAIN) ||
+ n == 0) {
control_close(fd, cs);
return;
}