delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/04/11/07:30:12

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
Message-ID: <4BC1B720.8060402@gmail.com>
Date: Sun, 11 Apr 2010 12:48:48 +0100
From: Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
CC: tmhikaru AT gmail DOT com
Subject: Re: Usage of _exit(0) closes fd's of parent process
References: <20100411054851 DOT GA25578 AT roll> <20100411062918 DOT GB7269 AT ednor DOT casa DOT cgf DOT cx>
In-Reply-To: <20100411062918.GB7269@ednor.casa.cgf.cx>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 11/04/2010 07:29, Christopher Faylor wrote:
> On Sun, Apr 11, 2010 at 01:48:51AM -0400, tmhikaru AT gmail wrote:

>> establishes a tcp connection in the parent, 

> your conclusions about the problem.  For instance, what does "stays
> connected" mean?  Are you using sockets, pipes, a file, shared memory,
> etc.?

  Call it guesswork or an assumption if you like, but I think he's using a TCP
socket!  Wasn't there a thread like this just recently that Corinna was
helping someone with a problem and it was to do with some kind of "winsock
handles aren't quite like other handles when it comes to duplicating them"
problem?  I'll have a search through my old emails and see if I can find it.

  Hikaru, are you fully up-to-date with the latest Cygwin DLL?  And is it
possible for you to strip down your code to a tiny testcase using just the
minimal code to open the socket, accept the connection, fork the child and
call _exit, so that hopefully we can reproduce the problem?

    cheers,
      DaveK

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019