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

Re: Is this a bug in libc6?



> > 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.
> 
> Nope, you're reading that backwards. It says that if fclose() returns EOF_
> _and _errno_ = _EBADF_, then that means that the stream is not
> open.

You people are being unbelievably pedantic.

I know I'm not supposed to fclose() an already-closed stream, or one that
failed to fopen().  If I try that, I _expect_ unpredictable behaviour!

However, when I read the manpage, I found it quite unclear.  If I didn't
know better, I would think that double-fclose()ing a file was okay.

The bug is not in libc, it's in the manpage.  Fix the manpage.

Avery


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: