On Wed, 13 Jul 2005 17:45:45 +1200, David Mann wrote: > What state is the socket in? I remember having issues with the > TIME_WAIT state when closing a socket in a small application I wrote > a couple of years ago. Unfortunately I can't help beyond that > because I ended up replacing the socket code with a second named > pipe, which was much better suited to what I was doing.
Thanks to everyone for their suggestions, and keep them coming. So far, I don't think we've hit on the answer. The key is that the Win32 process running within WINE has released the socket and terminated gracefully. I think we're dealing with the internal workings of the wineserver process, which are undocumented except within the source code, as far as I can tell. If the Win32 process within WINE is terminated abnormally (e.g., with SIGKILL) it's a different story. But when it terminates (semi) gracefully, by its own volition, by being commanded to do so, or with SIGTERM, it should relinquish the socket (or other fd) immediately. The IP stack will take care of the rest. But I don't believe that it does. I believe that the real fd for the socket has a lifetime that far exceeds any reasonable requirement, due to the architecture of WINE. Unfortunately, I'm going to have to get _really_ cosy with the wineserver source code to figure it out. TTYL, DougF KG4LMZ

