------- Comment #1 from zlynx at acm dot org 2008-03-30 03:43 ------- Forgot to mention, I filed a bug for fwrite too: http://sources.redhat.com/bugzilla/show_bug.cgi?id=5998
Until they fix that (if they do) it will be useless to check fwrite's return value since you can't know how many bytes were written. I think the fix would be to use write directly or to use the file operations (which do seem to use write directly and check for EINTR returns) on fd 0. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35763