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

Here are the signals on my windows machine. I tried exactly what you said and none of these I tried seemed to work. I tried __die__, segv, kill, quit, and stop. I even thought that maybe the kill command just isn't working and so I tried a print statement in the signal subroutine and nothing.

(all are capitalized really) stop, num05, num06, alrm, num07, num24, num16, __warn__, num17, num18, num19, ill, chld, segv, __die__, pipe, cld, abrt, cont, int, quit, kill, break, term, num01, fpe, num10, num12

Please let me know if I didn't try the right ones. Also, I just wanted to point out that I think "kill 15, $kid_pid" doesn't work either just because I have a subroutine called "myexit" that runs when the users clicks the exit button from my tk app (rather than killing the windows window) and even that leaves the child hanging. Any idea on that either?

Eradicatore

  • Comment on Re: Making sure child process dies with parent on Win32

Replies are listed 'Best First'.
Re: Re: Making sure child process dies with parent on Win32
by the_slycer (Chaplain) on Jun 08, 2001 at 18:06 UTC
    Whoops - me bad, there is a better way in Tk - use OnDestroy. Now that I'm back at work I've looked at some of the Tk stuff that I've done and this is what I've used.
    $main_window->OnDestroy(sub { kill 15 => $kid; exit; } );
    The OnDestroy is a Tk routine, should do the trick. Get rid of the myexit sub and use this, you should be Ok. kill does work - just make sure you are killing the right pid :-)