lkml.org 
[lkml]   [2000]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: fclose() again
In <20000714202754.28444.qmail@web1906.mail.yahoo.com> Evan Langlois (goth_74@yahoo.com) wrote:
> Well, according to the man page, fclose() should return EBADF if the passed
> argument is not an open stream. No where does it say that it segfaults, and
> the I don't see when it returns EBADF instead of segfaulting.

> I think the library might need to be patched, wherever it is segfaulting.

No. Man page should be updated instead. If your program tried to call fclose
for something other then open stream you program is seriosly ill. Better to
fix it then try to band-aid it. And EBADF encourages such band-aids.


> ***** quote ************
> ** fclose requires a valid FILE object pointer, and NULL isn't among them.
> ** Case closed.
> **
> ** Andreas.




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.056 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site