How can a parent find out if one of its children is still alive

Matt Crawford matt at group-w.uchicago.edu
Wed Jun 6 08:41:46 AEST 1990


) DeadHead at cup.portal.com (Bruce M Ong) writes:
) > 	How can a parent find out if one of its children is still alive
) > or not without

Tom Armistead, wizard-wannabe, answers:
) i.e.:   if( kill( child_pid, 0 ) == -1 )
)             puts( "The child is dead" );

overlooking the possibility that the child exited many minutes ago and
the pid is now being used by some unrelated process.
________________________________________________________
Matt Crawford	     		matt at oddjob.uchicago.edu



More information about the Comp.unix.wizards mailing list