Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: How do I examine the status of a process?

by stephen (Priest)
on Feb 05, 2000 at 05:15 UTC ( #2890=note: print w/replies, xml ) Need Help??


in reply to How do I examine the status of a process?

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:
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"; } }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://2890]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2019-11-20 01:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (96 votes). Check out past polls.

    Notices?