mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
exit on eof
This commit is contained in:
parent
33adad7dc7
commit
f8104b3d3d
1 changed files with 1 additions and 3 deletions
|
@ -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 a new issue