diff options
author | Eric Andersen <andersen@codepoet.org> | 2004-05-26 09:54:36 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2004-05-26 09:54:36 +0000 |
commit | d4d01d2b9bc1452c6417864ea5b300d34088c19a (patch) | |
tree | 98b38a19c92ab2d1dcbbf1a305241f30f19f20ec /coreutils | |
parent | 7f164cd05226615e9518e74eceb0b47c15cbe3e6 (diff) | |
download | busybox-d4d01d2b9bc1452c6417864ea5b300d34088c19a.tar.gz |
Rob Landley writes:
Run this test, against both busybox and a non-busybox version of "tee".
while true; do i=$[$i+1]; echo "hello $i"; sleep 1; done | ./busybox tee
Now run the busybox one again with the following small patch applied:
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/tee.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/tee.c b/coreutils/tee.c index bb2896663..25c108725 100644 --- a/coreutils/tee.c +++ b/coreutils/tee.c @@ -78,7 +78,7 @@ int tee_main(int argc, char **argv) *p = NULL; /* Store the sentinal value. */ #ifdef CONFIG_FEATURE_TEE_USE_BLOCK_IO - while ((c = fread(buf, 1, BUFSIZ, stdin)) != 0) { + while ((c = read(0, buf, BUFSIZ)) != 0) { for (p=files ; *p ; p++) { fwrite(buf, 1, c, *p); } |