bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#35046: [PATCH] factor: check the standard output instead of the stan


From: Paul Eggert
Subject: bug#35046: [PATCH] factor: check the standard output instead of the standard input
Date: Sat, 30 Mar 2019 22:14:36 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

Pádraig Brady wrote:
-        line_buffered = isatty (STDIN_FILENO);
+        line_buffered = isatty (STDOUT_FILENO);
        if (line_buffered)
          lbuf_flush ();
        else if (buffered >= FACTOR_PIPE_BUF)
That would impact use cases like:

   factor | sed -u 's/.*: *//'

Sure, but the longstanding tradition for almost all GNU utilities is for stdout to be line-buffered if it is a tty (regardless of whether stdin is a tty), and that's how 'factor' behaved until we started fooling with buffering in coreutils 8.24. Shouldn't we simply go back to the longstanding tradition for deciding whether to line-buffer stdout? Surely factor's current behavior is simply a bug introduced in 8.24 and not fixed in 8.26.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]