This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 1.3.6: bug in fork(): kill(pid,0) does not always find child


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]