checked of Fedora core 4 A recent report of an app we develope caused me to check the fprintf call. My understanding is that on an error (like EFBIG from the write syscall) the fprintf should return a negative value. Instead I'm seeing values greater than 0 returned, which would match the length of the string returned. It may only be that 1 errno value, I haven't checked all possiblilities but I thought I should let you know. karl.
This looks like it may be similar to an Ubuntu bug that has a test program. http://bugzilla.ubuntu.com/show_bug.cgi?id=14542
I think Ulrich Drepper may have fixed this in CVS having been told of the problem by Jim Meyering. 2005-09-04 Ulrich Drepper <drepper@redhat.com> ... * stdio-common/Makefile (tests): Add tst-put-error. * stdio-common/tst-put-error.c: New file. * libio/fileops.c (_IO_new_file_xsputn): If overflow fails and no more data would have to be written signal error. * libio/oldfileops.c (_IO_old_file_xsputn): Likewise.
Should be fixed by Ulrich's patch.