[Ecls-list] Closing BSD-SOCKET when a stream has been created
Juan Jose Garcia Ripoll
lisp at arrakis.es
Mon Feb 14 06:00:05 UTC 2005
Goffioul Michael wrote:
>If I'm right, the socket is not closed properly on (socket-close...)
>when a stream has been created. The reason is that the code relies
>on the fact that closing the stream should close the socket as well,
>but this is not the case as the stream is a two-way stream and in ECL
>the components of a two-way stream are not closed automatically.
>
The point is that the two-way stream is the only place where the sockets
streams themselves are referenced. This means that whenever the two-way
stream is garbage collected, the components will also be marked as
unreferenced and their associated streams closed. And as far as I can
tell, closing a FILE stream which was opened via fdopen() will also
close the file handled that was open with the bsd socket routines.
Juanjo
More information about the ecl-devel
mailing list