]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
dhcpcd: stderr callback fd may the reset by peer
authorRoy Marples <roy@marples.name>
Sun, 6 Sep 2020 12:27:31 +0000 (13:27 +0100)
committerRoy Marples <roy@marples.name>
Sun, 6 Sep 2020 12:27:31 +0000 (13:27 +0100)
When the process exits which is normal.

src/dhcpcd.c

index 861ff3bfeac049c892c7fec0acbff1bb94ee610f..efbd672babd2f48f36aed2d245f61d131838755d 100644 (file)
@@ -1792,7 +1792,8 @@ dhcpcd_stderr_cb(void *arg)
 
        len = read(ctx->stderr_fd, log, sizeof(log));
        if (len == -1) {
-               logerr(__func__);
+               if (errno != ECONNRESET)
+                       logerr(__func__);
                return;
        }