This is the mail archive of the cygwin-patches@cygwin.com 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: Workaround patch for MS CLOSE_WAIT bug


On Tue, Apr 16, 2002 at 09:06:32AM +0200, Corinna Vinschen wrote:
>On Mon, Apr 15, 2002 at 12:19:49PM -0400, Pierre A. Humblet wrote:
>> Christopher Faylor wrote:
>> 
>> > How can you second that 100% and then talk about how people have to
>> > change ther code to accomodate cygwin?  
>> I second 100% that it's best to find a solution that avoids the MS 
>> bug without requiring any change from Unix.
>> Meanwhile nobody "has to" do anything as a result of including
>> my proposal. 
>> I hope this discussion will generate better approaches.
>
>I think there's only one approach which would allow applications
>to run without special Cygwin patches.  When duplicating a socket,
>Cygwin needs to know the parent-child relationship between the
>sockets.  When closing a socket, the DLL has to check, if there's
>still a child socket left open.  If so, the socket isn't closed
>but moved into a "still-to-close" queue (like the delqueue) until
>all child sockets are closed.  The same for the application itself.
>If exit() has been called, Cygwin has to keep the application in a
>zombie-like state until the child sockets have been closed.
>
>The problem is that this requires a parent-child communication
>which isn't implemented yet.  This would be a job for the Cygwin
>daemon.
>
>Does that invalidate Pierre's approach?  I don't think so.

I don't see why a daemon is needed.  There is already parent/child
communication going on without the daemon.

cgf


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