Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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 browsing the Monastery: (20)
As of 2015-07-06 14:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (75 votes), past polls