bug-gnulib
[Top][All Lists]
Advanced

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

Re: failure to build due to ignoring fwrite() result


From: Jim Meyering
Subject: Re: failure to build due to ignoring fwrite() result
Date: Mon, 30 Aug 2010 23:14:48 +0200

Eric Blake wrote:
> On 08/30/2010 01:59 PM, Jim Meyering wrote:
>>> As I said, checking ferror() at the end of a write-to-log session then
>>> triggering an event.  "good enough" even if not excruciatingly perfect.
>>
>> Checking ferror is good enough as long as you rely only on fwrite, and
>> not say, *printf.  Some *printf failures are specified as not detectable
>> via ferror (but of course, the standard does not say that outright).
>
> But that's why we have xfprintf - for those cases where you can have
> failure without having ferror() set.

The functions in the xprintf module definitely solved my problems.
If you use them, just be sure you can live with the exit implied
by that "x", or the contortions required to avoid it.



reply via email to

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