bug-bison
[Top][All Lists]
Advanced

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

Re: [PATCH] do not ignore errors like ENOSPC, EIO when writing to stdout


From: Akim Demaille
Subject: Re: [PATCH] do not ignore errors like ENOSPC, EIO when writing to stdout
Date: Mon, 30 Jan 2012 09:55:51 +0100

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

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