diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd/shell/shell.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/shell/shell.c b/src/cmd/shell/shell.c index 3f33756..1387e48 100644 --- a/src/cmd/shell/shell.c +++ b/src/cmd/shell/shell.c @@ -115,7 +115,7 @@ void run_args(int argc, char **argv, struct redir *redir) { close(p[1]); for (;;) { long len = _sys_read(p[0], buf, buflen, 0); - if (len < 0) exit(0); + if (len <= 0) exit(0); fwrite(buf, 1, len, f); if (ferror(f)) exit(0); } |