aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)
*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);
}