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: Jim Meyering
Subject: Re: [PATCH] do not ignore errors like ENOSPC, EIO when writing to stdout
Date: Sun, 29 Jan 2012 21:18:58 +0100

Akim Demaille wrote:
> Le 29 janv. 2012 à 19:22, Jim Meyering a écrit :
>
>> This is incomplete in that I haven't added a test for it
>> and haven't updated NEWS -- since its effect is limited,
>> I'm not sure it's worthy of a NEWS entry.
>>
>> Before:
>>
>>    $ bison --print-datadir > /dev/full
>>    $ bison --print-datadir >&-
>>    $
>>
>> After:
>>
>>    $ bison --print-datadir > /dev/full
>>    bison: write error: No space left on device
>>    [Exit 1]
>>    $ bison --print-datadir >&-
>>    bison: write error: Bad file descriptor
>>    [Exit 1]
>>    $
>
> Hi Jim!
>
> Well, simple and efficient.  And yet another change with more
> metadata than genuine content :)
>
> Please install.  I wouldn't add it to NEWS either.

Thanks for the review.

> 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?),
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.



reply via email to

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