[Openmcl-devel] HANDLE leak in windows port
rwiker at gmail.com
Tue Jun 16 17:40:28 EDT 2009
I have a small web application built on top of Hunchentoot and
supporting libraries, and have noticed that the number of Windows
"handles" allocated to the process is steadily increasing. In fact,
there seems to be a small number of handles leaked on every HTTP
Having spent some time on this, my guess is that the low-level socket
code tries to close sockets using the close() call. This would work on
most Unixes (and Unixalikes), but Windows requires that closesocket()
is used instead of close().
It appears that the function make-ioblock-stream has a hook for adding
a socket-specific close() function, but it is hardcoded to 'fd-stream-
close in the call from make-fd-stream. The call to make-fd-stream, in
turn, has a TODO comment that indicates that the implementors have
thought about the possible need for specializing close() behaviour.
Does this make sense?
More information about the Openmcl-devel