Subject: Re: kill(pid, 0) issue
From: Brian Dessent <[email-masked]>
To: "[email-masked]'" <[email-masked]>
Date: Thu, 18 Dec 2003 11:48:49 -0800

Nowakowski Maciej-AMN011 wrote:

>       //int dummy;
>       //wait (&dummy);
>       getc(stdin);
>     }
>   printf ("%d = kill (%d, 0)\n", kill (pid, 0), pid);

When the child process terminates its in a zombie state until its parent
reaps it by calling wait.  Thus a call to kill will return success
because the child  process still exists.  If you were to do a ps listing
in this state you would see the child designated as a zombie.  This is
basic Unix process behavior.  See for example
<http://www.erlenstar.demon.co.uk/unix/faq_2.html#SEC13>

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/