Skip navigation.
Home
Your source for Perl tips, howto's, faq and tutorials
( categories: )

Send a 0 (zero) signal to the process ID you want to check using the kill function. If the process exists, the function returns true, otherwise it returns false.

Example:

#-- check if process 1525 is running
$exists = kill 0, 1525;
print "Process is running\n" if ( $exists );