On Sat, Apr 11, 1998 at 02:27:14PM -0400, Avery Pennarun wrote: > The point here is that it's _documented_ to return EBADF if the stream > pointer is not an open stream, and that's not what happens. This is > difficult to enforce in practice, and is not necessary for ISO compliance -- > so let's fix the man page.
Is it really so difficult to handle this situation though? Using Steve's test program on Solaris does as expected: [12:52pm] [EMAIL PROTECTED] gcc -Wall testprog.c -o testprog [12:52pm] [EMAIL PROTECTED] ./testprog open succeed fclose #1 succeed #2 says:: Error 0 fclose #2 succeed [12:52pm] [EMAIL PROTECTED] cc testprog.c -o testprog2 [12:52pm] [EMAIL PROTECTED] ./testprog2 open succeed fclose #1 succeed #2 says:: Error 0 fclose #2 succeed Interestingly, Solaris does not say it *may* return an error, but rather RETURN VALUES Upon successful completion, fclose() returns 0. Otherwise, it returns EOF and sets errno to indicate the error. Hamish -- Hamish Moffatt, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] Latest Debian packages at ftp://ftp.rising.com.au/pub/hamish. PGP#EFA6B9D5 CCs of replies from mailing lists are welcome. http://hamish.home.ml.org -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]