summaryrefslogtreecommitdiff
path: root/src/tee.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tee.c')
-rw-r--r--src/tee.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tee.c b/src/tee.c
index 39d989274..a5b0369fd 100644
--- a/src/tee.c
+++ b/src/tee.c
@@ -23,6 +23,7 @@
#include "system.h"
#include "error.h"
+#include "fadvise.h"
#include "stdio--.h"
#include "xfreopen.h"
@@ -157,6 +158,8 @@ tee_files (int nfiles, const char **files)
if (O_BINARY && ! isatty (STDOUT_FILENO))
xfreopen (NULL, "wb", stdout);
+ fadvise (stdin, FADVISE_SEQUENTIAL);
+
/* In the array of NFILES + 1 descriptors, make
the first one correspond to standard output. */
descriptors[0] = stdout;