aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-01-05 04:01:12 +0000
committerrsc <devnull@localhost>2005-01-05 04:01:12 +0000
commitf8104b3d3df082856fe6f94af3c0665b81f86127 (patch)
tree9834357dd3088b28c509ceb7bf1b1a63469d5063 /src
parent33adad7dc7934a898e51bc37706d2552da980846 (diff)
downloadplan9port-f8104b3d3df082856fe6f94af3c0665b81f86127.tar.gz
plan9port-f8104b3d3df082856fe6f94af3c0665b81f86127.tar.bz2
plan9port-f8104b3d3df082856fe6f94af3c0665b81f86127.zip
exit on eof
Diffstat (limited to 'src')
-rw-r--r--src/cmd/9term/win.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/cmd/9term/win.c b/src/cmd/9term/win.c
index 660c1aa3..a6ef1414 100644
--- 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);