mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-27 11:52:03 +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. */
|
/* Let typing have a go -- maybe there's a rubout waiting. */
|
||||||
yield();
|
yield();
|
||||||
n = read(fd1, buf+npart, 8192);
|
n = read(fd1, buf+npart, 8192);
|
||||||
if(n < 0)
|
if(n <= 0)
|
||||||
error(nil);
|
error(nil);
|
||||||
if(n == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
/* squash NULs */
|
/* squash NULs */
|
||||||
s = memchr(buf+npart, 0, n);
|
s = memchr(buf+npart, 0, n);
|
||||||
|
|
Loading…
Reference in a new issue