From fc35a3ef51b6f8a2735001b667dac63ae9154ed9 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Tue, 15 Jan 2013 08:22:26 +0100 Subject: [PATCH] lib: Don't close children on mere EAGAINs, but fail and wait for them. --- lib/cf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/cf.c b/lib/cf.c index 96181ee..86658f8 100644 --- a/lib/cf.c +++ b/lib/cf.c @@ -319,8 +319,10 @@ static int stdhandle(struct child *ch, struct hthead *req, int fd, void (*chinit return(0); } flog(LOG_ERR, "could not pass on request to child %s: %s", ch->name, strerror(errno)); - close(i->fd); - i->fd = -1; + if(errno != EAGAIN) { + close(i->fd); + i->fd = -1; + } return(-1); } } else if(i->type == CH_FORK) { -- 2.11.0