Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Thu, 24 Jan 2002 22:03:39 +0100 From: Corinna Vinschen To: "Pierre A. Humblet" Cc: cygwin AT cygwin DOT com Subject: Re: socket/fdopen/exec problem Message-ID: <20020124220339.K11608@cygbert.vinschen.de> Mail-Followup-To: "Pierre A. Humblet" , cygwin AT cygwin DOT com References: <3C50520B DOT 3239FAC5 AT ieee DOT org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3C50520B.3239FAC5@ieee.org> User-Agent: Mutt/1.3.22.1i On Thu, Jan 24, 2002 at 01:27:24PM -0500, Pierre A. Humblet wrote: > 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. Isn't that just the usual effect that sockets remain in TIME_WAIT state for 2MSL seconds? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- 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/