diff --git a/src/ctr_stdio.c b/src/ctr_stdio.c index 5d7eb5e7..aa0aced1 100644 --- a/src/ctr_stdio.c +++ b/src/ctr_stdio.c @@ -130,8 +130,8 @@ static bool read_stdio(int fd, stdpipe_t pipe, gboolean *eof) return false; } else if (num_read < 0) { if (errno == EAGAIN || errno == EWOULDBLOCK) { - // Non-blocking mode - no data available, return gracefully - return true; + // Non-blocking mode - no data available, stop draining + return false; } /* Ignore EIO if fd is a tty, since this can happen when the tty is closed while we are reading from it. */