Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

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


in reply to Re^2: 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

what is 'cP' argument means?

You are calling Win32::Process::Wait() as a subroutine; you should be calling it as a method.


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^3: Kill a process in perl windows and proceed only if it killed the process

Replies are listed 'Best First'.
Re^4: Kill a process in perl windows and proceed only if it killed the process
by Anonymous Monk on Jul 24, 2012 at 16:01 UTC
    sorry, I didn't understand.
    I get the processids of the applications running on a processing node and I just want to kill it and wait for that process to be killed. I am not creating the process using Win32::Process::Create().
      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?

        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)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://983451]
help
Chatterbox?
[Corion]: Hi marto!
[Corion]: I hope you were able to catch up on some sleep
Corion is slowly, slowly relaxing. Yesterday I spent vegging out in front of the PC, today at a friends, and hopefully I have the books for our Perl club done by Monday. I guess I'll only really relax once I get back from LPW

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2017-11-19 11:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (279 votes). Check out past polls.

    Notices?