From: Roy Marples Date: Sun, 12 Nov 2023 11:30:01 +0000 (+0000) Subject: control: Fix hangup for non privsep builds X-Git-Tag: v10.0.6~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=584b52db330a96471ff9301b85ce47ebb065a8a4;p=thirdparty%2Fdhcpcd.git control: Fix hangup for non privsep builds Fix related to #262. --- diff --git a/src/control.c b/src/control.c index 5325ac35..93041f82 100644 --- a/src/control.c +++ b/src/control.c @@ -113,8 +113,9 @@ control_handle_read(struct fd_list *fd) ssize_t bytes; bytes = read(fd->fd, buffer, sizeof(buffer) - 1); - if (bytes == -1) { + if (bytes == -1) logerr(__func__); + if (bytes == -1 || bytes == 0) { control_hangup(fd); return; }