Could it be that you are looking for Win32::Process? With that you can launch your command and specify $ProcessObj->Wait($timeout) which
#! /usr/bin/perl use strict; use warnings; use Win32::Process; ###################################################################### +################## #MiscVariables my ($VERSION, $ProcessObj); ###################################################################### +################## $VERSION = "1.0.0"; Win32::Process::Create($ProcessObj, "$ENV{'SystemRoot'}/notepad.exe", "notepad test.txt", 0, # Don't inherit. NORMAL_PRIORITY_CLASS, ".") or die "Cannot Launch Anything\n"; if ($ProcessObj->Wait (10*1000)){ # execution of the process is successfully. $ProcessObj->Kill(0); print "Successful\n"; } else { # process has hung up for some reason print "The Process Hung - Killing it\n"; $ProcessObj->Kill(255); }
Update2: I seem to have gone down the wrong track.. :(
-----In reply to Re: Timeouts/timers on Win32 system
by AcidHawk
in thread Timeouts/timers on Win32 system
by Dovkont
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |