Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re: Perl syntax for enforcing time limits

by ncw (Friar)
on Apr 22, 2001 at 05:08 UTC ( #74501=note: print w/replies, xml ) Need Help??


in reply to Re: Perl syntax for enforcing time limits
in thread Perl syntax for enforcing time limits

Glad you like it!

Yes I should make the fact that it uses $SIG{ALRM} explicit in the documentation. However note that TimeLimit always uses local $SIG{ALRM} which means that it gets reset to its previous value when it goes out of scope.

The answer to Net::Ping of course is that it should use TimeLimit too if it uses alarm(), or if you have some code that you think might be using alarm() &or $SIG{ALRM} and not resetting it then bracket it in a time_limit { } block and that will reset the alarm() & $SIG{ALRM} properly.

Ideally I should submit TimeLimit so CPAN so everyone who uses alarm() anywhere should use it instead!

  • Comment on Re: Re: Perl syntax for enforcing time limits

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2022-01-28 23:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (74 votes). Check out past polls.

    Notices?