Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2015-01-27 19:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My top resolution in 2015 is:

















    Results (201 votes), past polls