Branch Coverage

blib/lib/Net/Server/Daemonize.pm
Criterion Covered Total %
branch 0 70 0.0


line true false branch
40 0 0 if not -e $pid_file or not -s $pid_file and -M _ > "0.01"
42 0 0 unless open my $fh, "<", $pid_file
45 0 0 $current_pid =~ /^(\d{1,10})/ ? :
48 0 0 if ($$ == $current_pid) { }
0 0 elsif (-d "/proc/${$}") { }
0 0 elsif (kill 0, $current_pid) { }
56 0 0 if $exists
72 0 0 unless open my $fh, ">", $pid_file
76 0 0 unless -e $pid_file
84 0 0 unless -e $pid_file
86 0 0 unless open my $fh, "<", $pid_file
91 0 0 if $current_pid ne $$
94 0 0 unless unlink $pid_file
108 0 0 $user =~ /^(\d+)$/ ? :
109 0 0 unless defined $uid
118 0 0 if ($group =~ /^\d+$/) { }
122 0 0 unless defined $id
127 0 0 unless @gid
136 0 0 if ($< != $uid or $> != $uid)
138 0 0 if ($< != $uid)
154 0 0 unless (grep {$gid == $_;} split(/\s+/, $(, 0))
164 0 0 unless set_gid(@group)
165 0 0 unless set_uid($user)
176 0 0 unless POSIX::sigprocmask(0, $sigset)
179 0 0 unless defined $pid
183 0 0 unless POSIX::sigprocmask(1, $sigset)
194 0 0 if defined $pid_file
202 0 0 if $pid
205 0 0 if defined $pid_file
206 0 0 if defined $pid_file
210 0 0 unless open STDIN, "<", "/dev/null"
211 0 0 unless open STDOUT, ">", "/dev/null"
212 0 0 unless open STDERR, ">&STDOUT"
215 0 0 unless chdir "/"
220 0 0 if defined $pid_file