Path: utzoo!attcan!uunet!cs.utexas.edu!texbell!vector!void!ozdaltx!toma From: toma@ozdaltx.UUCP (Tom Armistead) Newsgroups: comp.unix.wizards Subject: Re: How can a parent find out if one of its children is still alive Summary: kill(0) Message-ID: <6334@ozdaltx.UUCP> Date: 2 Jun 90 05:14:48 GMT References: <30408@cup.portal.com> Distribution: na Organization: AIDS INFO EXCG/OZ BBS - Dallas, TX Lines: 25 In article <30408@cup.portal.com>, DeadHead@cup.portal.com (Bruce M Ong) writes: > I am sure there is a very easy way to do this, but I just havent > figured this one out: > > How can a parent find out if one of its children is still alive > or not without ..... If you have the process id of the child you can use kill(2) to find out if it is still there. i.e.: if( kill( child_pid, 0 ) == -1 ) puts( "The child is dead" ); Signal 0 is called the NULL signal and is used to validate a process id, no signal is actually sent to the destination process. Will this do it for you? Tom -- ------------------------------- {uunet,smu}!sulaco!ozdaltx!toma (Tom Armistead @ Garland, Texas) {uunet,smu}!sulaco!ozdaltx!swsrv1!toma