This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [OT] Re: fopen(NULL) causes segmentation fault
- To: Michael Vance <briareos at lokigames dot com>
- Subject: Re: [OT] Re: fopen(NULL) causes segmentation fault
- From: Mo McKinlay <mmckinlay at labs dot interopen dot org>
- Date: Tue, 28 Mar 2000 19:54:58 +0100 (GMT)
- cc: Andrew Wiseman <a dot wiseman at bandc dot dircon dot co dot uk>, gcc-bugs at gcc dot gnu dot org
# Shouldn't fclose set errno to EBADF and then return? From the man
# page:
# EBADF The argument stream is not an open stream.
Possibly, although at a guess EBADF is returned when the file descriptor
that the stream points to has already been closed, as opposed to the FILE
pointer being invalid. (i.e., EBADF is returned by the underlying
close() call). I've not looked at the specs/docs in huge detail, so I
could well be wrong.
In either case, it's still not a gcc issue :-)
Mo.
--
Mo McKinlay Chief Software Architect inter/open
mmckinlay@labs.interopen.org http://www.interopen.org