We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3253070 commit 98c1b7dCopy full SHA for 98c1b7d
aproc.c
@@ -114,9 +114,9 @@ int aproc_drain_all(aproc_t *aprocs, int *ttyfd) {
114
// Read and invoke callback
115
if (FD_ISSET(aproc->rfd, &readfds)) {
116
nbytes = read(aproc->rfd, &buf, 1024);
117
+ if (nbytes == 0) aproc->is_done = 1;
118
buf[nbytes] = '\0';
119
aproc->callback(aproc, buf, nbytes);
- if (nbytes == 0) aproc->is_done = 1;
120
}
121
// Destroy on eof.
122
// Not sure if ferror and feof have any effect here given we're not
0 commit comments