Subject: | Missing flag to disable use of Time::HiRes |
Hello,
we want to use Sys::SigAction in a perl script which performs long
running tasks.
Normally these tasks finish within 60 minutes. Which is also the max.
allowed runtime.
Our issue is that the combination of Sys::SigAction and Time::HiRes
can't handle timeout values greater than 2147 well.
Reason is that the conversion from seconds to microseconds results in a
integer overflow for timeout values greater than 2147.
Simple test script:
$/usr/bin/perl -e 'use Sys::SigAction;
Sys::SigAction::timeout_call(2148, sub { for $i (0 .. 100) { print
$i,"\n"}}); done'
Time::HiRes::ualarm(-2146967296, 0): negative time not invented yet at
/usr/local/perl-5.14.2_64_3/lib/site_perl/5.14.2/Sys/SigAction.pm line 37.
What's missing is a switch to disable the use of Time::HiRes in
Sys::SigAction. Such a switch would trigger Sys::SigAction to use the
Perl alarm() subroutine (which can handle such great values).
What do you think about implementing such a switch?
Technical data:
Sys::SigAction-0.15
Perl 5.14.2
AIX 5.3
Best regards,
Daniel Ritter