]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
control: ignore EPIPE errors on write
authorRoy Marples <roy@marples.name>
Wed, 17 May 2023 09:45:34 +0000 (09:45 +0000)
committerRoy Marples <roy@marples.name>
Wed, 17 May 2023 09:45:34 +0000 (09:45 +0000)
Other end has shutdown.

src/control.c

index ecd6d47febe1c2b8db6cee3362e777479a376ee3..8c6306907a8cebda3c1d7aab3abe7f5bb053784e 100644 (file)
@@ -164,7 +164,8 @@ control_handle_write(struct fd_list *fd)
        }
 
        if (writev(fd->fd, iov, iov_len) == -1) {
-               logerr("%s: write", __func__);
+               if (errno != EPIPE) // We don't get ELE_HANGUP for some reason
+                       logerr("%s: write", __func__);
                control_hangup(fd);
                return;
        }