Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Kill a perl script execution in windows

by nikosv (Hermit)
on Feb 18, 2013 at 16:06 UTC ( #1019358=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Kill a perl script execution in windows
in thread Kill a perl script execution in windows

you don't need the PID. The first script waits for a signal to terminate as:

use Win32::Event; use 5.010; $event = Win32::Event->new(1,0,"myevent"); while ($event->wait(0)==0) { say $i; print $i++; } say "exiting";
or just $event->wait(), depends on the situation.Then the second one can signal it to abort :
use Win32::Event; use 5.010; $event = Win32::Event->new(1,0,"myevent"); say $^E; $event->set;


Comment on Re^3: Kill a perl script execution in windows
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (11)
As of 2014-09-02 17:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (25 votes), past polls