Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: get list of processes triggered from parent script

by zentara (Archbishop)
on Oct 10, 2012 at 10:45 UTC ( #998193=note: print w/replies, xml ) Need Help??

in reply to get list of processes triggered from parent script

#!/usr/bin/perl -w use strict; use Proc::ProcessTable; # ignore the child $SIG{CHLD} = 'IGNORE'; # create 5 child processes for demo purpose. arrange them so they stay # long enough so we can find them later for(1..5){ sleep(10) and exit if(fork == 0); } # list all process running in your machine and find all # child process for my $p (@{new Proc::ProcessTable->table}){ print $p->pid," child of $$\n" if($p->ppid == $$); }

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://998193]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2018-06-20 14:52 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (116 votes). Check out past polls.