Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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

by Anonymous Monk
on Jul 20, 2012 at 02:18 UTC ( #982742=note: print w/ replies, xml ) Need Help??


in reply to Kill a process in perl windows and proceed only if it killed the process

In the general case, killing a process is an asynchronous event ... it can take an arbitrary amount of time, especially if there are interactive dialog-boxes involved, and this can pragmatically result in situations like deadlock; or even actual deadlock of the user-interface. So, fire the bullet but don't wait for the body to hit the floor. Emphatically don't wait...


Comment on Re: Kill a process in perl windows and proceed only if it killed the process
Re^2: Kill a process in perl windows and proceed only if it killed the process
by prashantktyagi (Scribe) on Jul 20, 2012 at 10:18 UTC

    will system(kill -9 <pid>) not work here ? I am just curious...

      Not on Windows. And if you are on a POSIX system, why shell out instead of using the built-in kill?
      Indeed, on Linux I myself prefer system(shutdown -r now).
      --
      if ( 1 ) { $postman->ring() for (1..2); }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2014-09-23 06:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (210 votes), past polls