note
clintp
Under Win32, create a separate thread and start your external process under that thread. Back in the parent thread, start counting until you want the timout to expire (or Wait() for it) then kill the thread. It looks something like this:
<code>
Win32::Process::Create($proc, "c:\foo.exe", "foo.exe arg1 arg2 arg3",
0, $priority,
".") || die "can't create process, ". Win32::FormatMessage( Win32::GetLastError());
my $ret= $proc->Wait($timeoutsecs * 1000);
if (! $ret ) {
# Still running, kill it.
$proc->Kill(0);
}</code>
337705
337737