dannoura has asked for the wisdom of the Perl Monks concerning the following question:
I want to use Win32::Process to create multiple processes for a LWP script. I can't figure out two things:
use Win32::Process; use Win32; sub ErrorReport{ print Win32::FormatMessage( Win32::GetLastError() ); } Win32::Process::Create(my $ProcessObj, $^X, 'c:\perl\progs\garb1.pl', 0, NORMAL_PRIORITY_CLASS, ".")|| die ErrorReport(); $ProcessObj->Wait(2000); my $pid=$ProcessObj->GetProcessID(); my $exitcode=0; Win32::Process::KillProcess($pid, $exitcode); print $exitcode;
-----------------------------------
Any comments about coding style are welcome.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: two questions about Win32::Process
by mda2 (Hermit) on Apr 29, 2005 at 23:15 UTC | |
by dannoura (Pilgrim) on Apr 29, 2005 at 23:42 UTC | |
|
Re: two questions about Win32::Process
by ZlR (Chaplain) on Apr 30, 2005 at 11:14 UTC |