>
>
>On Sunday 01 September 2002 14:03, Michael Sternberg wrote:
>  
>
>>Sorry if I'm starting a long thread with this letter :)
>>I digged through the Google and did not find anything that
>>will fully answer me to the next questions:
>>
>>1. How can I reproduce situation that my code will leave
>>   sockets in CLOSE_WAIT state ?
>>
>>2. What measures can I take to prevent them to appear ?
>>
>>3. Why can't I release them from outside with some utility ?
>>
Because sockets are actually file descriptors in the process' file 
descriptors table - the owning process is the only one that is able to 
control them (and under some conditions - childs of that process). this 
is what we call in the buisness - "security" ;-)

>>4. (Optional question) I got the feeling that situation in M$ world
>>   with sockets hanging around is a little better. Am I right and
>>   why is that ?
>>    
>>
No - wrong. the situation in the M$ world with sockets hanging around is 
quite worse: if a process did not close() a socket before exiting in 
Unix, it's parent will clean up after it automaticly. in Win32 the 
system should clean up and more often then not it does not do so, or 
does not do so properly, so you get sockets hanging around long after 
the application who created them went away. it's usually not a problem 
in client applications (which do not do much listen()), but its a major 
problem with server applications and one of the reasons that M$ systems 
are not considered good candidates to run servers on. if you ever ran 
IIS and after shutting it down (or having it crash) you try to restart 
it and it simply wont, until you reboot - this is probably the problem. 
this information is correct as for NT4. I got the impression that in NT5 
and 5.1 the situation is somewhat better.

--
Oded Arbel
m-Wise mobile solutions
[EMAIL PROTECTED]

+972-9-9581711 (116)
+972-67-340014

::..
"Mistrust a subordinate who never finds fault with his superior."
        -- John Churton Collins



=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to