lkml.org 
[lkml]   [2000]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: SIGSEGV on fclose

>matt@theBachChoir.org.uk said:
>> but his example fcloses a file which was not opened. This isn't
>> "further access".
>
>He said that it arises from a program that closes a file twice.

Yup, except the second time the program tries to fclose, the filehandle
is
not pointing to anything useful, aka not an open stream.

>
>> Is it difficult for Linux to spot the the file isn't open and
return
>> EBADF? What does POSIX have to say about this? IMHO making it
easier
>> to port your programs to Linux (and behaving a little more sanely
:)
>> is worth a couple of extra bytes of anyone's kernel.
>
Agreed, it took several days to track this one down in a program that
runs
without problems on all the unix'es.

On scanning the net I noticed that other people have had the same
problem,
which is why I reported it here.


Regards,
Bjarne

-
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.078 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site