[BusyBox-cvs] busybox/coreutils tee.c,1.24,1.25
Erik Andersen,,,
andersen at busybox.net
Wed May 26 09:54:39 UTC 2004
Update of /var/cvs/busybox/coreutils
In directory nail:/tmp/cvs-serv23916/coreutils
Modified Files:
tee.c
Log Message:
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:
Index: tee.c
===================================================================
RCS file: /var/cvs/busybox/coreutils/tee.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- a/tee.c 15 Mar 2004 08:28:21 -0000 1.24
+++ b/tee.c 26 May 2004 09:54:36 -0000 1.25
@@ -78,7 +78,7 @@
*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);
}
More information about the busybox-cvs
mailing list