I could not figure out how to get the tool process's id. But by observing,
I notice that its pid is 'always' equals to child process's pid+1.
PIDs can wrap, so there is no guarantee of this at all.
Why do you call waitpid with -1, when you know the pid you want to
wait on ($kidpid).
The reason for zombies (ie, "(perl)") is normally that the process
has died, but no one has requested the termination status (with
waidpid or its cousins).
I admit to having no idea what execEggplant does. But it sounds like
it is running another subprocess. Really, it needs to wait on that
sub process and return when it is complete.
You could use killall to find the process by name:
killall -s -d Preview
although that is always a bit risky if the process name is not known
and unique.
Otherwise you have problems.
Peter.
--
Check out Interarchy 8.1.1, just released, now with Amazon S3 support.
<http://www.stairways.com/> <http://download.stairways.com/>