Branch Coverage

blib/lib/Mojo/Server/DaemonControl.pm
Criterion Covered Total %
branch 6 64 9.3


line true false branch
40 1 1 unless my $pid = -r $self->pid_file && $self->pid_file->slurp
42 1 0 if $pid and kill 0, $pid
48 0 1 if -s (my $file = $self->pid_file)
54 0 0 unless my $pid = $self->check_pid
56 0 0 kill('USR2', $pid) ? :
62 0 0 if (my $pid = $self->check_pid)
73 0 0 if $self->workers > 0
102 0 0 if $self->{'worker_read'}
103 0 0 unless pipe $self->{'worker_read'}, $self->{'worker_write'}
109 0 0 if $w->{$signal}
122 0 0 if (my $signal = $self->{'stop_signal'})
123 0 0 unless keys %$pool
136 0 0 unless my $w = $pool->{$pid}
137 0 0 if ($w->{'graceful'}) { }
0 0 elsif (not $w->{'time'}) { }
0 0 elsif ($w->{'time'} + $ht <= $time) { }
145 0 0 if ($n_missing > 0) { }
0 0 elsif (not @starting) { }
152 0 0 unless my $w = $pool->{$pid}
153 0 0 if ($gt and $w->{'graceful'} + $gt < $time) { }
165 0 0 unless $select->can_read("0.1")
166 0 0 unless $self->{'worker_read'}->sysread(my $chunk, 4194304)
170 0 0 unless my $w = $self->{'pool'}{$1}
171 0 0 if $2 eq "k"
172 0 0 if $2 eq "g"
181 0 0 unless defined(my $pid = fork)
182 0 0 if ($pid)
199 0 0 unless my $flags = fcntl($fh, 1, 0)
200 0 0 unless fcntl $fh, 2, $flags & '18446744073709551614'
202 0 0 if $fh eq $self->{'worker_write'}
221 0 0 unless my $w = delete $self->{'pool'}{$pid}
229 1 1 if $path and -e $path