]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
factor: buffer stdout like other progs do
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 26 Sep 2024 22:41:03 +0000 (15:41 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 28 Sep 2024 00:42:59 +0000 (17:42 -0700)
* src/factor.c (lbuf_putnl): Don’t worry about whether
stdin is a tty when deciding whether to buffer stdout.

src/factor.c

index 35b556f7556f5f645194adb7a46b087e46d6ffd7..f947022e1dc35e937e22013c26f30043cad6ad8c 100644 (file)
@@ -2360,7 +2360,7 @@ lbuf_putnl (void)
   /* Provide immediate output for interactive use.  */
   static int line_buffered = -1;
   if (line_buffered < 0)
-    line_buffered = isatty (STDIN_FILENO) || isatty (STDOUT_FILENO);
+    line_buffered = isatty (STDOUT_FILENO);
 
   if (line_buffered)
     lbuf_flush ();