| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Message-ID: | <3FE204A1.76EC91B@dessent.net> |
| Date: | Thu, 18 Dec 2003 11:48:49 -0800 |
| From: | Brian Dessent <brian AT dessent DOT net> |
| Organization: | My own little world... |
| MIME-Version: | 1.0 |
| To: | "'cygwin AT cygwin DOT com'" <cygwin AT cygwin DOT com> |
| Subject: | Re: kill(pid, 0) issue |
| References: | <E087F7025D7E494B8015119695CEDB4C0209B0C0 AT zpl02exm01 DOT mpsc DOT mot DOT com> |
| X-AntiAbuse: | This header was added to track abuse, please include it with any abuse report |
| X-AntiAbuse: | Primary Hostname - host.linuxsv3.net |
| X-AntiAbuse: | Original Domain - cygwin.com |
| X-AntiAbuse: | Originator/Caller UID/GID - [47 12] / [47 12] |
| X-AntiAbuse: | Sender Address Domain - dessent.net |
| X-IsSubscribed: | yes |
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |