Mail Archives: cygwin-developers/2000/09/01/20:59:02
--W/nzBZO5zC0uMSeA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Sat, Sep 02, 2000 at 12:39:30AM +0400, Egor Duda wrote:
>Hi!
>
>Saturday, 02 September, 2000 Chris Faylor cgf AT cygnus DOT com wrote:
>
>>>i've reproduced this under gdb and see that if i call
>>>proc_can_be_signalled it won't do wait_for_me() but skip to
>
>CF> If it's not calling wait_for_me() then why is it hanging?
>
>it's not hanging, waitpid returns ECHILD
>
>CF> "simple test case" == "some minimal number of c instructions
>CF> demonstrating the behavior".
>
>ok, i'll try
I've duplicated the problem. A test case is below.
I'll look into this.
cgf
--W/nzBZO5zC0uMSeA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="forkwait.c"
#include <stdio.h>
#include <sys/wait.h>
#include <errno.h>
int
main (int argc, char **argv)
{
int pid, n;
if ((pid = fork ()) == 0)
exit (0);
sleep (2);
if ((n = waitpid (pid, NULL, 0)) != pid)
printf ("wait pid failed, pid %d, n %d, errno %d\n", pid, n, errno);
else
printf ("wait pid succeeded, pid %d, n %d, errno %d\n", pid, n, errno);
exit (0);
}
--W/nzBZO5zC0uMSeA--
- Raw text -