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

Re: Making sure child process dies with parent on Win32

by the_slycer (Chaplain)
on Jun 08, 2001 at 05:32 UTC ( [id://86851]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Making sure child process dies with parent on Win32

What you need to do is trap the signal that is sent when the program exits. I can't remember off the top of my head what that is called on Windows - but if you print keys %SIG you should be able to tell.

Once you get it figured out which signal you need to trap, put something like the following in your code (before the MainLoop).
$SIG{KILL}=sub { kill 15 => $kid; exit; };
Note, you will also want to read through perlipc for more info regarding trapping of signals.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://86851]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.