delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/01/19/13:38:54

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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 <cgf AT redhat DOT com>
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
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/

- Raw text -


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