Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
use Win32::Process; $program = "c:\\perl\\scripts\\tail.exe"; $outfile = "c:\\perl\\scripts\\new_logfile.txt"; $arg0 = " -f c:\\perl\scripts\\logfile.txt"; $endit = time + 60; Win32::Process::Create($ProcessObj, "$program", "$arg0", 0, NORMAL_PRI +ORITY_CLASS, ".")|| die ErrorReport(); until ($endit > time) { next; } $pid = $ProcessObj->GetProcessID(); Win32::Process::KillProcess($pid, $exitcode);
|
|---|