http://www.perlmonks.org?node_id=875011


in reply to Re^2: fixed set of forked processes
in thread fixed set of forked processes

Your parent process will know the PID of each child process, so you can kill 0, $pid to see if it's running. Not sure what the performance implications are.

Since you were mentioning ps & grep, I thought I'd mention this simple alternative.

If all you want is to know if children are alive or dead, you might want to look into $SIG{CHLD} which tells you when kids die. That's in perlipc too.

--Pileofrogs