line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Protocol::DBus::Socket; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
26
|
use strict; |
|
5
|
|
|
|
|
17
|
|
|
5
|
|
|
|
|
119
|
|
4
|
5
|
|
|
5
|
|
16
|
use warnings; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
91
|
|
5
|
|
|
|
|
|
|
|
6
|
5
|
|
|
5
|
|
727
|
use Socket (); |
|
5
|
|
|
|
|
3159
|
|
|
5
|
|
|
|
|
84
|
|
7
|
|
|
|
|
|
|
|
8
|
5
|
|
|
5
|
|
1835
|
use IO::SigGuard ('send'); |
|
5
|
|
|
|
|
2475
|
|
|
5
|
|
|
|
|
30
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# No support for this (POSIX-standard!) constant in macOS or Solaris. |
11
|
5
|
|
50
|
5
|
|
2178
|
use constant _MSG_NOSIGNAL => eval { Socket::MSG_NOSIGNAL() } || 0; |
|
5
|
|
|
|
|
14
|
|
|
5
|
|
|
|
|
10
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub send_nosignal { |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# This is for OSes that don’t define this constant: |
16
|
3
|
|
|
3
|
0
|
5
|
local $SIG{'PIPE'} = 'IGNORE' if !_MSG_NOSIGNAL(); |
17
|
|
|
|
|
|
|
|
18
|
3
|
|
|
|
|
27
|
return IO::SigGuard::send( $_[0], $_[1], $_[2] | _MSG_NOSIGNAL() ); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
my $sent; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub sendmsg_nosignal { |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# This is for OSes that don’t define this constant: |
26
|
0
|
|
|
0
|
0
|
|
local $SIG{'PIPE'} = 'IGNORE' if !_MSG_NOSIGNAL(); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
SEND: { |
29
|
0
|
|
|
|
|
|
$sent = Socket::MsgHdr::sendmsg( $_[0], $_[1], $_[2] | _MSG_NOSIGNAL() ); |
|
0
|
|
|
|
|
|
|
30
|
0
|
0
|
|
|
|
|
if (!defined $sent) { |
31
|
0
|
0
|
|
|
|
|
redo SEND if $!{'EINTR'}; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
return $sent; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |