Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Killing a hanging child process

by ozone (Friar)
on Sep 11, 2006 at 22:15 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (8)
As of 2024-04-18 21:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found