commit f8104b3d3df082856fe6f94af3c0665b81f86127
parent 33adad7dc7934a898e51bc37706d2552da980846
Author: rsc <devnull@localhost>
Date: Wed, 5 Jan 2005 04:01:12 +0000
exit on eof
Diffstat:
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/cmd/9term/win.c b/src/cmd/9term/win.c
@@ -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);