| 1 | package Protocol::DBus::Socket; | ||||||||||||
| 2 | |||||||||||||
| 3 | 5 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 5 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | |||||||||||||
| 6 | 5 | ▶ | use Socket (); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | |||||||||||||
| 8 | 5 | ▶ | use IO::SigGuard ('send'); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 9 | |||||||||||||
| 10 | # No support for this (POSIX-standard!) constant in macOS or Solaris. | ||||||||||||
| 11 | 5 | ▶ | use constant _MSG_NOSIGNAL => eval { Socket::MSG_NOSIGNAL() } || 0; | ||||||||||
|
Subroutine
BEGIN: called CC=2 SCAR=7.0
Condition50%1/2
eval {
do {
16384
}
} || 0
MC/DC0%0/1
eval {
do {
16384
}
} || 0
eval {
do {
16384
}
}
Truth table50%1/2
A
A= eval {
do {
16384
}
}
| |||||||||||||
| 12 | |||||||||||||
| 13 | sub send_nosignal { | ||||||||||||
| 14 | |||||||||||||
| 15 | # This is for OSes that don’t define this constant: | ||||||||||||
| 16 | 3 | ▶ | local $SIG{'PIPE'} = 'IGNORE' if !_MSG_NOSIGNAL(); | ||||||||||
|
Subroutine
send_nosignal: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 17 | |||||||||||||
| 18 | 3 | return IO::SigGuard::send( $_[0], $_[1], $_[2] | _MSG_NOSIGNAL() ); | |||||||||||
| 19 | } | ||||||||||||
| 20 | |||||||||||||
| 21 | 5 | my $sent; | |||||||||||
| 22 | |||||||||||||
| 23 | sub sendmsg_nosignal { | ||||||||||||
| 24 | |||||||||||||
| 25 | # This is for OSes that don’t define this constant: | ||||||||||||
| 26 | 0 | ▶ | local $SIG{'PIPE'} = 'IGNORE' if !_MSG_NOSIGNAL(); | ||||||||||
|
Subroutine
sendmsg_nosignal: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||
| 27 | |||||||||||||
| 28 | SEND: { | ||||||||||||
| 29 | 0 | $sent = Socket::MsgHdr::sendmsg( $_[0], $_[1], $_[2] | _MSG_NOSIGNAL() ); | |||||||||||
| 30 | 0 | ▶ | if (!defined $sent) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 31 | 0 | ▶ | redo SEND if $!{'EINTR'}; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 32 | } | ||||||||||||
| 33 | } | ||||||||||||
| 34 | |||||||||||||
| 35 | 0 | return $sent; | |||||||||||
| 36 | } | ||||||||||||
| 37 | |||||||||||||
| 38 | 5 | 1; | |||||||||||