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.
--
Eric Blake [email protected] +1-801-349-2682
Libvirt virtualization library http://libvirt.org