No No No. For question #1, I want to kick off several lengthy processes and then do 
other things.  I then want to peridocially check to see which ones are still running.  
So how do I know if one process is still running?  I know can store the PID for that 
process but how do I use that to see if it is still going?

Thanks for the help anyway

On 26 Mar 2002, Greene, Adam S wrote:

> 1. Call the wait method on your process object
>
> Create your process and get the PID
> Win32::Process::Create ($process, $program,
> $commandline, $inherit, $flags, $dir); $pid =
> $process->GetProcessID();
>
> Create a loop and check for the process to
> finish if( $process->Wait(1)) { print "Process
> is done\n"; } else{ print "Process is running
> as $pid\n"; }
>
> 2. The name of the process in the task manager
>    will be the program that is being called in
>    $program. If you specify
>    'c:/perl/bin/perl.exe', you will see a lot
>    of perl.exe in your process list.
>
> 3. Not sure on that one...can have specified
>    timeout limits that you Wait() for and kill
>    if it doesn't end. Not sure how the other
>    methods respond when a process gets into
>    that state.
>
>
> Win32::Process works pretty well. I created a
> script that will process a list of servers and
> spawn a script against each of them (or
> against a subset of the total list), up to a
> maximum number of concurrent processes. The
> script ensures that there are always the max
> number of processes running as long as there
> are more servers to process. Makes it easy to
> throttle and is faster than serially
> processing the servers.
>
> Adam Greene Intel Corporation
> [EMAIL PROTECTED]
>
>
>
>
>
> -----Original Message----- From: rAuL
> [mailto:[EMAIL PROTECTED]] Sent: Tuesday,
> March 26, 2002 12:00 PM To:
> [EMAIL PROTECTED]; pe-
> [EMAIL PROTECTED]
> Subject: Win32::Process::Create Questions
>
>
>
> 1) If I create a background process using
>    Win32::Process::Create, how do I determine
>    it is still running?
>
> 2) When I create this process, what name does
>    it take if I look under NT Task Manager?
>
> 3) How can I also determine if this process is
>    in "Not Responding" state?
>
> Thanks Again Raul
> _____________________________________________-
> __
> Perl-Win32-Admin mailing list
> [EMAIL PROTECTED] To
> unsubscribe: http://listserv.ActiveState.com/-
> mailman/mysubs
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to