Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Sat, 19 Jan 2002 13:39:06 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: 1.3.6: bug in fork(): kill(pid,0) does not always find child Message-ID: <20020119183906.GA3486@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <3C480F5A DOT 7EDF164A AT salomon DOT at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3C480F5A.7EDF164A@salomon.at> User-Agent: Mutt/1.3.23.1i On Fri, Jan 18, 2002 at 01:04:42PM +0100, Michael Haubenwallner wrote: >There is a problem in fork(), in combination with kill(pid, 0) >to check if the child is alive: > >When a fork() returned the pid to the parent, and the parent >does a kill(pid, 0) to check if the child is alive, the kill >sometimes return -1 and errno=ESRCH (No such process). This should be fixed in the next release. Basically, the problem was that the process was not considered to actually "exist" since it couldn't respond to signals yet. It was still in the initialization phase. I've removed that consideration from the "does the process exist" part of cygwin. Hopefully, this won't screw something else up. Thanks much for the test case. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/