note
stephen
In general, you can use "kill" with signal number zero
to check on the existence of a process. See 'man perlipc' for
details. Here's code:
<CODE>
use strict;
MAIN:
{
my $pid = $ARGV[0];
if (kill 0 => $pid) {
print STDOUT "Process '$pid' exists\n";
}
else {
print STDOUT "Process '$pid' does not exist\n";
}
}
</CODE>
2867
2867