X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <20091123091612.GE29173@calimero.vinschen.de> References: <20091119094439 DOT GC29173 AT calimero DOT vinschen DOT de> <20091120093210 DOT GQ29173 AT calimero DOT vinschen DOT de> <20091121110204 DOT GB23273 AT calimero DOT vinschen DOT de> <20091121212239 DOT GD29173 AT calimero DOT vinschen DOT de> <20091123091612 DOT GE29173 AT calimero DOT vinschen DOT de> Date: Mon, 23 Nov 2009 17:43:33 +0800 Message-ID: Subject: Re: [1.7] Updated: cygwin-1.7.0-65 From: Huang Bambo To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 2009/11/23 Corinna Vinschen : > On Nov 22 09:33, Huang Bambo wrote: >> And there's another quesiton: >> The handle of chile process( created by fork ) seems never been closed >> bye parent process. Is it need to be closed? > > I don't understand the question. =A0There's one dangling socket handle le= ft > and I know where and why it happens. =A0Other than that, I don't see any > other socket handling which is left open accidentally. > While run my last test code, every time comes one connection, there are 3 handle leak( I monited it by Process Explorer( from www.sysinternals.com)), one is the chile process's handle, one is of "Section \BaseNamedObjects\cygwin1S5-9770bb4ddbd85dca\cygpid.xxxx", the other one is of \Device\Afd. I mean is there any other leak with those handles. Simple code like the following will not leak anything: #include #include int main(void) { pid_t pid =3D fork(); while(1) { if ( pid =3D=3D 0 ) { sleep(5); printf("Child: %d ended\n", getpid()); return 0; } else if ( pid > 0 ) { printf("New process forked.\n"); sleep(10); } } } -- 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