This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: 1.3.6: bug in fork(): kill(pid,0) does not always find child
- From: Christopher Faylor <cgf at redhat dot com>
- To: cygwin at cygwin dot com
- Date: Sat, 19 Jan 2002 13:39:06 -0500
- Subject: Re: 1.3.6: bug in fork(): kill(pid,0) does not always find child
- References: <3C480F5A.7EDF164A@salomon.at>
- Reply-to: cygwin at cygwin dot com
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/