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