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: kill(pid, 0) issue


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/


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