This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fwrite on a closed file


Roland McGrath wrote:
When fwrite is called on a closed file, it is supposed to return zero as
the number of bytes written.


I don't know where you got this idea.  After you call fclose, any other use
of that FILE * is undefined behavior.

Roland,


I had only concentrated on what specs say about fwrite, so I had missed this part about fclose. Sorry about that and thanks for pointing it out.

Sripathi.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]