The attached file demonstrates a problem with a combination of socket, fdopen and exec. It was observed on Win98/ME/NT4/2000. Latest everything. Please cc: me directly.
A server is listening on port 999 and forking worker processes. It can be restarted by kill -HUP. Under some conditions, new connections stop being accepted and netstat -a shows two listen on port 999. The demo is based on a widely ported program (exim) where the problem first surfaced. It appears to be related to the use of fdopen(). To reproduce: 1) Compile and run in a window. 2) In another window, a) telnet localhost 999 then quit b) kill -HUP pid c) netstat -a shows two listen on port 999 New connections may or may not be accepted, and mayhem can occasionally be observed with netstat. Yes, all sockets are closed. No, playing with the "close on exec" bit or with "linger" does not seem to help. Pierre
tcpdemo.c
Description: application/unknown-content-type-c_auto_file
-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/