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

How do I examine the status of a process?

by Delfer (Novice)
on Feb 04, 2000 at 21:49 UTC ( #2867=perlquestion: print w/replies, xml ) Need Help??

Delfer has asked for the wisdom of the Perl Monks concerning the following question:

IS THERE ANY FUNCTION THAT LET ME KNOW WHETHER IT IS IN EXISTENCE AND HOW TO USE THE FUNCTION? CAN YOU ADVISE ME ON THIS MATTER? MANY THANKS
  • Comment on How do I examine the status of a process?

Replies are listed 'Best First'.
Re: How do I examine the status of a process?
by stephen (Priest) on Feb 05, 2000 at 05:15 UTC
    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"; } }
Re: How do I examine the status of a process?
by IndyZ (Friar) on Feb 07, 2000 at 06:37 UTC
    Hope you can get that capslock key fixed. I recommend prying it off with a screwdriver, then using a little rubbing alchohol to loosen up the dirt.
      it's wise just to avoid using it altogether, i think. -e. e. cummings
        it's wise just to avoid using it altogether, i think. -e. e. cummings

        that and that pesky period key - e e   cummings
Re: How do I examine the status of a process?
by Anonymous Monk on Feb 04, 2000 at 22:28 UTC

    depends - which OS are you using? If you're using some *nix try this:

    ps aux | grep perl

Re: How do I examine the status of a process?
by Anonymous Monk on Feb 05, 2000 at 09:46 UTC
    There is a pm out there that will do this. Nice little package. However, I have forgotten where it is. Could be useful.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (9)
As of 2019-12-06 15:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (156 votes). Check out past polls.

    Notices?