This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: fwrite on a closed file
- From: Roland McGrath <roland at redhat dot com>
- To: Sripathi Kodi <sripathik at in dot ibm dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 24 Feb 2006 12:53:32 -0800 (PST)
- Subject: Re: fwrite on a closed file
> 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.