[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Is this a bug in libc6?



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] moffatt@yallara[~] gcc -Wall testprog.c -o testprog
[12:52pm] moffatt@yallara[~] ./testprog
open succeed
fclose #1 succeed
#2 says:: Error 0
fclose #2 succeed
[12:52pm] moffatt@yallara[~] cc testprog.c -o testprog2
[12:52pm] moffatt@yallara[~] ./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, hamish@debian.org, hamish@rising.com.au, hmoffatt@mail.com
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 debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: