>>17What's wrong with this?
return fclose (stdout) == EOF;
It seems to work nicely for the case of >/dev/full, fflush works fine too.
Or they could just use write(2) like their friends at plan9, write does not use buffers. (or just disable buffering on stdout)