Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Monitoring Child Process

by runrig (Abbot)
on Oct 19, 2011 at 18:42 UTC ( #932463=note: print w/ replies, xml ) Need Help??


in reply to Monitoring Child Process

It would probably be better to keep your kid pids as keys in a hash, then delete them as they are reaped. You are currently printing all of the pids that were created on ctl-C.


Comment on Re: Monitoring Child Process
Replies are listed 'Best First'.
Re^2: Monitoring Child Process
by Anonymous Monk on Oct 19, 2011 at 18:59 UTC
    I'm not sure what you mean, but I incorporated your suggestion and it didn't solve the problem.

    When I run the script (without pressing ctrl-c), it will say something like this at the end...
    Process 2555 exited. Process 2558 exited.
    The problem is that I know the script create processes 2556 and 2557 and the REAPER subroutine somehow did not catch it and in reality these children have exited already.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (11)
As of 2015-07-29 19:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (267 votes), past polls