Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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

Replies are listed 'Best First'.
Re^2: Alarms with ActivePerl do not work properly
by eyepopslikeamosquito (Chancellor) 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?
[perldigious]: A question since I'm ignorant of what's normal for database management... Do admins change column names a lot in databases?
[perldigious]: On occasion my scripts break, because they will do something that seems laregly pointless to me... like in this case, changing a column name from "ABC Category" to "ABC Category Override".
[perldigious]: Being the ignorant one, my initial reaction to that is, "that's sort of a dick move, a lot of people like me expect column names like that to stay the same, why the hell would you change them like that for seemingly no good reason?"
[perldigious]: Or is my irritation/ frustration well founded?

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (9)
As of 2017-05-25 13:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?