From 3719649587b06791a6aed41e30447525095e94c5 Mon Sep 17 00:00:00 2001 From: msmith3125 Date: Fri, 6 Dec 2019 07:33:38 -0800 Subject: [PATCH] cat: propagate data as soon as we get it We're not doing anything special (e.g., formatting, conversions, or other transformations) in cat.c : simple_cat(...), so we should just propagate the data as soon as we get it --- src/cat.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cat.c b/src/cat.c index d8c444aaf..c6f1a7e18 100644 --- a/src/cat.c +++ b/src/cat.c @@ -159,6 +159,10 @@ simple_cat ( { /* Actual number of characters read, and therefore written. */ size_t n_read; + + /* Propagate data as soon as we get it */ + + setvbuf (stdout, NULL, _IONBF, 0); /* Loop until the end of the file. */ -- 2.24.0.windows.2