lib: Don't log mere EAGAINs.
[ashd.git] / lib / cf.c
index 47db8c2..5a6388e 100644 (file)
--- a/lib/cf.c
+++ b/lib/cf.c
@@ -386,9 +386,10 @@ static int stdhandle(struct child *ch, struct hthead *req, int fd, void (*chinit
                freeca(args);
                if(!sendreq2(sd->fd, req, fd, MSG_NOSIGNAL | MSG_DONTWAIT))
                    return(0);
+               serr = errno;
            }
-           flog(LOG_ERR, "could not pass on request to child %s: %s", ch->name, strerror(serr));
            if(serr != EAGAIN) {
+               flog(LOG_ERR, "could not pass on request to child %s: %s", ch->name, strerror(serr));
                close(sd->fd);
                sd->fd = -1;
            }