Re: Socket handling seems to acquire and loose system resources. (again)
Daniel Diaz <[email protected]>
| Newsgroups | gmane.comp.gnu.prolog.general |
|---|---|
| Message-ID | <[email protected]> |
Hello Maurizio Thank you for this investigation. I'll have a look at this asap to see if the problems comes from there and if I can call closesocket() somewhere in my code. Daniel Ferreira Maurizio a écrit : > 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. > > > > -- Ce message a ete verifie par MailScanner pour des virus ou des polluriels et rien de suspect n'a ete trouve.