On Sat, 30 Jul 2022 18:19:02 -0500, Scott Cheloha wrote: > Bump. The standard's error cases for fflush(3) are identical to those > for fclose(3): > > https://pubs.opengroup.org/onlinepubs/9699919799/functions/fflush.html > https://pubs.opengroup.org/onlinepubs/9699919799/functions/fclose.html > > Is the fact that our fclose(3) can succeed even if the error flag is > set a bug?
As far as I can tell, neither fflush() nor fclose() check the status of the error flag, though they may set it of course. That is why I was suggesting an explicit ferror() call at the end. - todd