line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Linux::Perl::SigSet; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
15
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
69
|
|
4
|
3
|
|
|
3
|
|
12
|
use warnings; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
75
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
my $sig_num_hr; |
7
|
|
|
|
|
|
|
|
8
|
3
|
|
|
3
|
|
12
|
use constant _SIG_MAX => 63; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
651
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub from_list { |
11
|
2
|
|
|
2
|
0
|
7
|
my (@list) = @_; |
12
|
|
|
|
|
|
|
|
13
|
2
|
|
|
|
|
18
|
my $vec = q<>; |
14
|
|
|
|
|
|
|
|
15
|
2
|
|
|
|
|
23
|
for my $sig (@list) { |
16
|
2
|
50
|
|
|
|
17
|
if ($sig =~ tr<0-9><>c) { |
17
|
|
|
|
|
|
|
|
18
|
2
|
|
33
|
|
|
20
|
$sig_num_hr ||= do { |
19
|
2
|
|
|
|
|
20
|
require Config; |
20
|
2
|
|
|
|
|
641
|
my @names = split m< >, $Config::Config{'sig_name'}; |
21
|
2
|
|
|
|
|
8
|
my %signum; |
22
|
|
|
|
|
|
|
|
23
|
2
|
|
|
|
|
296
|
@signum{@names} = split m< >, $Config::Config{'sig_num'}; |
24
|
2
|
|
|
|
|
39
|
\%signum; |
25
|
|
|
|
|
|
|
}; |
26
|
|
|
|
|
|
|
|
27
|
2
|
|
50
|
|
|
10
|
$sig = $sig_num_hr->{$sig} || die "Unrecognized signal: '$sig'"; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
2
|
|
|
|
|
12
|
vec( $vec, $sig - 1, 1 ) = 1; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
2
|
|
|
|
|
8
|
vec( $vec, _SIG_MAX(), 1 ) = 0; |
34
|
|
|
|
|
|
|
|
35
|
2
|
|
|
|
|
10
|
return $vec; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |