[EMAIL PROTECTED] wrote:

Hi All!
I Have 2 perl scripts
first script calls Win32::Process::Create
and exits
in second script I want to kill
process  created in first script
But how I can pass $procobj to second
script to kill it like  <$procobj->Kill($exi)>
Or how can I in first script get $pid of process from $procobj?

Hi,
One option is to start the process in the _background_, than you do not have to have a second script to kill the process.
Win32::Process::Create($ProcessObj,
   $archiveprog,
       $paramstring,
       1,
       NORMAL_PRIORITY_CLASS,
       $workdir) || die;

and with
$ProcessObj->GetProcessID();
you get the PID of the process.
Now you can handle the PID in this script and don't need a second one.

Reinhard
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to