GNU bug report logs - #35046
[PATCH] factor: check the standard output instead of the standard input

Previous Next

Package: coreutils;

Reported by: Shugo Maeda <shugo <at> ruby-lang.org>

Date: Sat, 30 Mar 2019 08:31:02 UTC

Severity: normal

Tags: patch

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 35046 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Pádraig Brady <P <at> draigBrady.com>,
 Shugo Maeda <shugo <at> ruby-lang.org>, 35046 <at> debbugs.gnu.org
Subject: Re: bug#35046: [PATCH] factor: check the standard output instead of
 the standard input
Date: Sat, 30 Mar 2019 22:14:36 -0700
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.




This bug report was last modified 6 years and 48 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.