This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: socket/fdopen/exec problem

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                      
Red Hat, Inc.

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]