summaryrefslogtreecommitdiff
path: root/usr.sbin/httpd
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2015-12-05 13:15:28 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2015-12-05 13:15:28 +0000
commit6f2aa8b0e980a251b178417803edb1088b014897 (patch)
tree94417c743b25f8e364487235ab5c76915e5bf499 /usr.sbin/httpd
parentfb1fbb2bee40770f12e27ddf78fdbc55f5d3f4b9 (diff)
EAGAIN handling for imsg_read. OK henning@ benno@
Diffstat (limited to 'usr.sbin/httpd')
-rw-r--r--usr.sbin/httpd/control.c5
-rw-r--r--usr.sbin/httpd/proc.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/httpd/control.c b/usr.sbin/httpd/control.c
index f3f462eac6c..c29cd5b9725 100644
--- a/usr.sbin/httpd/control.c
+++ b/usr.sbin/httpd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.8 2015/11/23 20:56:14 reyk Exp $ */
+/* $OpenBSD: control.c,v 1.9 2015/12/05 13:15:27 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -230,7 +230,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;
}
diff --git a/usr.sbin/httpd/proc.c b/usr.sbin/httpd/proc.c
index f3561f0de52..646281a92d0 100644
--- a/usr.sbin/httpd/proc.c
+++ b/usr.sbin/httpd/proc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: proc.c,v 1.13 2015/12/02 15:13:00 reyk Exp $ */
+/* $OpenBSD: proc.c,v 1.14 2015/12/05 13:15:27 claudio Exp $ */
/*
* Copyright (c) 2010 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -452,7 +452,7 @@ proc_dispatch(int fd, short event, void *arg)
ibuf = &iev->ibuf;
if (event & EV_READ) {
- if ((n = imsg_read(ibuf)) == -1)
+ if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
fatal(__func__);
if (n == 0) {
/* this pipe is dead, so remove the event handler */