projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f164cd
)
Rob Landley writes:
author
Eric Andersen
<andersen@codepoet.org>
Wed, 26 May 2004 09:54:36 +0000
(09:54 -0000)
committer
Eric Andersen
<andersen@codepoet.org>
Wed, 26 May 2004 09:54:36 +0000
(09:54 -0000)
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:
coreutils/tee.c
patch
|
blob
|
history
diff --git
a/coreutils/tee.c
b/coreutils/tee.c
index bb28966639c833d2f1b0655d6b195947a148a039..25c108725c885f41c6bbfd64808bd987b011a8da 100644
(file)
--- 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);
}