line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Protocol::DBus::Socket; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
20
|
use strict; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
88
|
|
4
|
4
|
|
|
4
|
|
16
|
use warnings; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
72
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
16
|
use Socket (); |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
96
|
|
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
|
1396
|
use IO::SigGuard ('send'); |
|
4
|
|
|
|
|
760
|
|
|
4
|
|
|
|
|
20
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# No support for this (POSIX-standard!) constant in macOS or Solaris. |
11
|
4
|
|
50
|
4
|
|
1728
|
use constant _MSG_NOSIGNAL => eval { Socket::MSG_NOSIGNAL() } || 0; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
8
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub send_nosignal { |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# This is for OSes that don’t define this constant: |
16
|
3
|
|
|
3
|
0
|
6
|
local $SIG{'PIPE'} = 'IGNORE' if !_MSG_NOSIGNAL(); |
17
|
|
|
|
|
|
|
|
18
|
3
|
|
|
|
|
6720
|
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; |