line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Copyrights 2011-2015 by [Mark Overmeer]. |
2
|
|
|
|
|
|
|
# For other contributors see ChangeLog. |
3
|
|
|
|
|
|
|
# See the manual pages for details on the licensing terms. |
4
|
|
|
|
|
|
|
# Pod stripped from pm file by OODoc 2.01. |
5
|
4
|
|
|
4
|
|
27158
|
use warnings; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
94
|
|
6
|
4
|
|
|
4
|
|
11
|
use strict; |
|
4
|
|
|
|
|
2
|
|
|
4
|
|
|
|
|
104
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
package POSIX::1003::Signals; |
9
|
4
|
|
|
4
|
|
12
|
use vars '$VERSION'; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
146
|
|
10
|
|
|
|
|
|
|
$VERSION = '0.99_07'; |
11
|
|
|
|
|
|
|
|
12
|
4
|
|
|
4
|
|
13
|
use base 'POSIX::1003::Module'; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
828
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my @functions = qw/ |
15
|
|
|
|
|
|
|
raise sigaction signal sigpending sigprocmask sigsuspend signal |
16
|
|
|
|
|
|
|
signal_names strsignal |
17
|
|
|
|
|
|
|
/; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
my (@handlers, @signals, @actions); |
20
|
|
|
|
|
|
|
my @constants; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
our %EXPORT_TAGS = |
23
|
|
|
|
|
|
|
( signals => \@signals |
24
|
|
|
|
|
|
|
, actions => \@actions |
25
|
|
|
|
|
|
|
, handlers => \@handlers |
26
|
|
|
|
|
|
|
, constants => \@constants |
27
|
|
|
|
|
|
|
, functions => \@functions |
28
|
|
|
|
|
|
|
, tables => [ '%signals' ] |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
our @IN_CORE = qw/kill/; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
my $signals; |
34
|
|
|
|
|
|
|
our %signals; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
BEGIN { |
37
|
4
|
|
|
4
|
|
716
|
$signals = signals_table; |
38
|
|
|
|
|
|
|
|
39
|
4
|
|
|
|
|
42
|
push @constants, keys %$signals; |
40
|
4
|
|
|
|
|
53
|
push @handlers, grep /^SIG_/, keys %$signals; |
41
|
4
|
|
|
|
|
182
|
push @signals, grep !/^SA_|^SIG_/, keys %$signals; |
42
|
4
|
|
|
|
|
53
|
push @actions, grep /^SA_/, keys %$signals; |
43
|
|
|
|
|
|
|
|
44
|
4
|
|
|
|
|
24
|
tie %signals, 'POSIX::1003::ReadOnlyTable', $signals; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
# Perl does not support pthreads, so: |
49
|
0
|
|
|
0
|
1
|
0
|
sub raise($) { CORE::kill $_[0], $$ } |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
24
|
|
|
24
|
1
|
3066
|
sub sigaction($$;$) {goto &POSIX::sigaction } |
53
|
0
|
|
|
0
|
1
|
0
|
sub sigpending($) {goto &POSIX::sigpending } |
54
|
0
|
|
|
0
|
1
|
0
|
sub sigprocmask($$;$) {goto &POSIX::sigprocmask } |
55
|
0
|
|
|
0
|
1
|
0
|
sub sigsuspend($) {goto &POSIX::sigsuspend } |
56
|
0
|
|
|
0
|
1
|
0
|
sub signal($$) { $SIG{$_[0]} = $_[1] } |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
1
|
50
|
|
1
|
1
|
27
|
sub strsignal($) { _strsignal($_[0]) || "Unknown signal $_[0]" } |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
#-------------------------- |
62
|
|
|
|
|
|
|
|
63
|
0
|
|
|
0
|
1
|
0
|
sub signal_names() { @signals } |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
0
|
|
|
0
|
1
|
0
|
sub sigaction_names() { @actions } |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
#-------------------------- |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
sub exampleValue($) |
72
|
0
|
|
|
0
|
1
|
0
|
{ my ($class, $name) = @_; |
73
|
0
|
|
|
|
|
0
|
my $val = $signals->{$name}; |
74
|
0
|
0
|
|
|
|
0
|
defined $val ? $val : 'undef'; |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
sub _create_constant($) |
79
|
87
|
|
|
87
|
|
65
|
{ my ($class, $name) = @_; |
80
|
87
|
|
|
|
|
86
|
my $val = $signals->{$name}; |
81
|
87
|
|
|
0
|
|
334
|
sub() {$val}; |
|
0
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
1; |