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

Re: Alarms with ActivePerl do not work properly

by tokpela (Chaplain)
on Jan 12, 2011 at 22:37 UTC ( #882001=note: print w/ replies, xml ) Need Help??


in reply to Alarms with ActivePerl do not work properly

An alternative method to monitor your process could be to execute using Win32::Job and set a timeout using run($timeout).


Comment on Re: Alarms with ActivePerl do not work properly
Re^2: Alarms with ActivePerl do not work properly
by eyepopslikeamosquito (Canon) on Jan 13, 2011 at 07:59 UTC

    Yes, FWIW a few years back I found Win32::Job the least painful way to solve my problem of running a command for a specified period of time, then killing it. I originally did a sigalarm-based Unix version (in Timing and timing out Unix commands); the final Win32::Job-based Windows version can be found in Re: Timing Windows commands. Completely different code for each platform, which is ugly. However, I've found nothing but pain with signals on Windows and always avoid them on that platform, in both Perl and C. Note that the native Win32 API has no concept of signals.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2014-04-18 08:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (464 votes), past polls