Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 Organization: My own little world... MIME-Version: 1.0 To: "'cygwin AT cygwin DOT com'" Subject: Re: kill(pid, 0) issue References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 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/