aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-05-26 09:54:36 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-05-26 09:54:36 +0000
commit03c55e18d540d56cb5892d6a375a59947b41d2b5 (patch)
tree98b38a19c92ab2d1dcbbf1a305241f30f19f20ec
parent42a12a57c23743ef1e05429cf41e54158cfa2bce (diff)
downloadbusybox-w32-03c55e18d540d56cb5892d6a375a59947b41d2b5.tar.gz
busybox-w32-03c55e18d540d56cb5892d6a375a59947b41d2b5.tar.bz2
busybox-w32-03c55e18d540d56cb5892d6a375a59947b41d2b5.zip
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: git-svn-id: svn://busybox.net/trunk/busybox@8869 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--coreutils/tee.c2
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)
78 *p = NULL; /* Store the sentinal value. */ 78 *p = NULL; /* Store the sentinal value. */
79 79
80#ifdef CONFIG_FEATURE_TEE_USE_BLOCK_IO 80#ifdef CONFIG_FEATURE_TEE_USE_BLOCK_IO
81 while ((c = fread(buf, 1, BUFSIZ, stdin)) != 0) { 81 while ((c = read(0, buf, BUFSIZ)) != 0) {
82 for (p=files ; *p ; p++) { 82 for (p=files ; *p ; p++) {
83 fwrite(buf, 1, c, *p); 83 fwrite(buf, 1, c, *p);
84 } 84 }