/usr/share/perl5/Sys/SigAction/Alarm.pm is in libsys-sigaction-perl 0.20-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | package Sys::SigAction::Alarm;
require 5.005;
use strict;
#use warnings;
use vars qw( @ISA @EXPORT_OK );
require Exporter;
@ISA = qw( Exporter );
@EXPORT_OK = qw( ssa_alarm );
my $have_hires = scalar eval 'use Time::HiRes; Time::HiRes::ualarm(0); 1;';
use POSIX qw( INT_MAX ceil ) ;
my $hrworks;
sub ssa_alarm($)
{
my $secs = shift;
#print print "secs=$secs\n";
if ( $hrworks and ($secs le (INT_MAX()/1_000_000.0) ) )
{
Time::HiRes::ualarm( $secs * 1_000_000 );
}
else
{
alarm( ceil( $secs ) );
}
}
sub hires_works { return $hrworks; }; #test support
$hrworks = 1; 1;
|