On Saturday, December 15, 2018 7:02 PM, Samuel Thibault <sthiba...@debian.org> wrote:
> Hello, > > Asher Gordon, le sam. 15 déc. 2018 18:51:19 -0500, a ecrit: > > > If I use fputs(3), fputc(3), or fwrite(3) to write to a file that can > > be opened for writing but cannot be written to (e.g /dev/full), the > > functions return 1 rather than the expected EOF (or 0 in the case of > > fread()). > > Well, that is not surprising since these functions are buffered. You > need to call fflush() to make sure that no error happened on the actual > underlying write. > > Samuel You're right. I tried it with fflush() and it gave expected results. I guess we can close this bug now.