Re: Number of open files

Anselm Baird_Smith wrote:
> 
> Michael Stolz writes:
>  > Shawn McMurdo wrote:
>  > >
>  > > Hi all,
>  > > I am wondering if it is normal for the server to have a
>  > > large number of file descriptors open simultaneously and
>  > > if it actually closes them when it is done with them.
>  > >
>  >
>  > I've noticed when running Jigsaw on Windows/NT that once it
>  > has served up a '.shtml' file, I can no longer edit that
>  > file because when I try to save it, I get a message box
>  > indicating that some other program has it open. My guess is
>  > that Jigsaw isn't closing '.shtml' files when it's done reading
>  > them.
> 
> Me again, sorry, I haven't tested it but:
> w3c.jigsaw.ssi.SSIStream.java: line 65
> 
>         in = null ;
>         if(SSIResource.debug)
>             System.out.println("@@@@ no more segments") ;
>         return false ;
> 
> should probably read:
> 
>         in = null ;
>         try { file.close() } catch (Exception ex) {}
>         if(SSIResource.debug)
>             System.out.println("@@@@ no more segments") ;
>         return false ;
> 
> Anselm.
Yes, I think this is the error.
But Antonio Ramirez was somehow right: He thought maybe thaught that
garbage collection could close the file for him.
But there is no finalize() in RandomAccessFile (, which I regard as a
bug); so the filehandles in a Unix system stay alive as long as the
process runs. (I think ;-)

Bye,
	Christoph
-- 
Christoph Begall                begall@NADS.de
NADS GmbH                       NADS - Advertising on Nets
Otto-Hahn-Str. 18               Tel.:  +49 231 975 123-0
D-44227 Dortmund                http://www.nads.de/

Received on Thursday, 5 June 1997 10:23:55 UTC