Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Killing a hanging child process

by ozone (Friar)
on Sep 11, 2006 at 22:15 UTC ( #572417=note: print w/replies, xml ) Need Help??


in reply to Killing a hanging child process

You could use a non-blocking waitpid and simply time all the children, then signal/kill them if they go over whatever limits you set.

(from perldoc -f waitpid)

use POSIX ":sys_wait_h"; ... do { $kid = waitpid(-1, WNOHANG); } until $kid > 0;

status of the child is in $?

HTH!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2022-05-22 14:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (80 votes). Check out past polls.

    Notices?