Sorry for bothering you again.
Finally I was able to compile and inspect your program.
I've seen that in the procedure CREATE_SOCKET_STREAMS (sockets_c.c)
you use _open_osfhandle.
Searching with Google I arrived at the following article:
http://support.microsoft.com/kb/185727
Toward the end of the article is written :
When _open_osfhandle is used on a socket descriptor, both _close() and
closesocket() should be called before exiting. _close() only closes the
file handle. closesocket() has to be called as well to close the socket
descriptor and clean up the underlying socket object.
Since my program only closes the associated streams, (and it cannot do
otherwise)
can this be the cause of increasing system handles ?
Regards.
Maurizio Ferreira.