This is the mail archive of the
mailing list for the Cygwin project.
Re: socket/fdopen/exec problem
- From: Corinna Vinschen <cygwin at cygwin dot com>
- To: "Pierre A. Humblet" <Pierre dot Humblet at ieee dot org>
- Cc: cygwin at cygwin dot com
- Date: Thu, 24 Jan 2002 22:03:39 +0100
- Subject: Re: socket/fdopen/exec problem
- References: <3C50520B.3239FAC5@ieee.org>
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 Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:firstname.lastname@example.org
Red Hat, Inc.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html