Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^4: Backticks and SIGALRM

by sgt (Chaplain)
on Aug 21, 2007 at 14:14 UTC ( #634091=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Backticks and SIGALRM
in thread Backticks and SIGALRM

Just a minor pick (which applies to all posted solutions so far) , on unixlike the killing part should be in at least two stages: first send signal of normal termination (SIGTERM) and then signal of immediate termination (SIGKILL) to let the ext. app a chance to clean up. In some cases even stop/cont signals can be appropriate. It is probably better to send signal to the process group id (perl kill with negative signal, or system shell kill with negative pid) or to take care of the external app potential children (or simply imagine you fired a shell...); if the external app has acted "daemonic" then one should have knowledge about the app's behaviour, /proc or a process table walker could be of help.

cheers, --stephan


Comment on Re^4: Backticks and SIGALRM

Log In?
Username:
Password:

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

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 2014-11-23 06:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (128 votes), past polls