Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^5: Kill a process in perl windows and proceed only if it killed the process

by BrowserUk (Pope)
on Jul 24, 2012 at 16:15 UTC ( #983455=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Kill a process in perl windows and proceed only if it killed the process
in thread Kill a process in perl windows and proceed only if it killed the process

I am not creating the process using Win32::Process::Create().

Then you will need to obtain a handle to the process using:

my $proc = Win32::Process::Open( $pid, $iflags ); Creates a handle Perl can use to an existing process as identified by +$pid.

And then call the Wait method on that handle:

$proc->Wait( <milliseconds|INFINITE> );

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?


Comment on Re^5: Kill a process in perl windows and proceed only if it killed the process
Select or Download Code
Re^6: Kill a process in perl windows and proceed only if it killed the process
by Anonymous Monk on Jul 24, 2012 at 17:12 UTC
    Can I use this syntax: Win32::Process::Open(my $proc, $pid, undef) ?
    I tried the syntax you suggested but gave me the following error
    Usage: Win32::Process::Open(cP, pid, inherit)
      Can I use this syntax: Win32::Process::Open(my $proc, $pid, undef) ?

      Yes.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

      The start of some sanity?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://983455]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (18)
As of 2014-07-23 14:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (144 votes), past polls