exit on eof
This commit is contained in:
parent
33adad7dc7
commit
f8104b3d3d
@ -443,10 +443,8 @@ stdoutproc(void *v)
|
||||
/* Let typing have a go -- maybe there's a rubout waiting. */
|
||||
yield();
|
||||
n = read(fd1, buf+npart, 8192);
|
||||
if(n < 0)
|
||||
if(n <= 0)
|
||||
error(nil);
|
||||
if(n == 0)
|
||||
continue;
|
||||
|
||||
/* squash NULs */
|
||||
s = memchr(buf+npart, 0, n);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user