<?xml version="1.0" encoding="windows-1252"?>
<node id="553968" title="Re: Children with Win32::Process when dying" created="2006-06-07 02:22:20" updated="2006-06-06 22:22:20">
<type id="11">
note</type>
<author id="524150">
syphilis</author>
<data>
<field name="doctext">
Perhaps in the "non-Tk script" you can include an END{} block - something like:
&lt;code&gt;
END{$obj-&gt;Kill($exitcode) if $obj-&gt;GetExitCode() == STILL_ACTIVE};
&lt;/code&gt;
For that to work you'll need to be using version 0.10 of Win32::Process and you'll need to load the module as:
&lt;code&gt;
use Win32::Process (STILL_ACTIVE);
&lt;/code&gt;
Even with earlier versions of Win32::Process there's probably a way of doing it - assuming that the END{} block is the way to go - which I've not properly tested. In fact you might even find it sufficient to simply:&lt;code&gt;
END{$obj-&gt;Kill($exitcode)};
&lt;/code&gt; which would work for earlier versions of Win32::Process, too.&lt;br&gt;&lt;br&gt;Also check the syntax of the GetExitCode() call (if you find you need to use it). The docs have it written as &lt;code&gt;
$ProcessObj-&gt;GetExitCode($exitcode);
&lt;/code&gt; but supplying an argument doesn't smell right to me.&lt;br&gt;&lt;br&gt;Cheers,&lt;br&gt;Rob </field>
<field name="root_node">
553965</field>
<field name="parent_node">
553965</field>
</data>
</node>
