Hi!

Le 29 janv. 2012 à 21:18, Jim Meyering a écrit :

>> For my education: why not closing stderr too?  Sure, it's
>> then hard to decide where to send the error message, but at least
>> the exit status would change.
> 
> If we're writing anything to stderr, it's probably because
> there's already been some error (why else write to stderr?),

There can be warnings send to stderr too.  Or logs
if some verbose mode is activated.

> and thus the exit status will already be nonzero.
> 
> There might be a case for it in bison, though, if it generates
> non-diagnostics to stderr.

They are diagnostics, but not hard errors.  And anyway, as the
point is safety, I just wondered what's the point of closing
stdout only, and not both stdout and stderr in every single
program, just for regularity.

Sure, what is sent to stdout is certainly more important than
stderr, but while at it...


Reply via email to