Branch Coverage

blib/lib/DBIx/QuickDB/Watcher.pm
Criterion Covered Total %
branch 23 118 19.4


line true false branch
36 0 0 if $self->{'master_pid'} == $$
41 0 0 if $self->{'server_pid'}
44 0 0 unless pipe $rh, $wh
47 0 0 unless defined $pid
49 0 0 if ($pid)
55 0 0 unless $self->{'watcher_pid'}
56 0 0 unless $self->{'server_pid'}
64 0 0 unless defined $pid
65 0 0 if $pid
71 0 0 unless eval { do { $self->watch($wh); 1 } }
94 0 0 unless my $spid = $self->{'server_pid'}
153 0 0 unless open STDIN, "<", \$blah
155 0 0 unless my $master_pid = $params{'master_pid'}
156 0 0 unless my $server_pid = $params{'server_pid'}
157 0 0 unless my $data_dir = $params{'data_dir'}
163 0 0 if ($hup and not $hupped)
165 0 0 unless open STDOUT, ">", \$blah
167 0 0 unless open STDERR, ">", \$blah
172 0 0 if kill 0, $master_pid
176 0 0 unless (eval { do { $class->_watcher_terminate("send_sig", $signal, "fast_sig", $fast_signal, "got_sig", $kill, "pid", $server_pid, "dir", $data_dir); 1 } })
188 0 0 if $self->{'server_pid'}
205 0 0 unless my $pid = $params{'pid'}
206 0 0 unless my $dir = $params{'dir'}
216 0 0 if ($got_sig and $got_sig eq "FAST_TERM")
221 0 0 if -d $dir
228 0 0 if ($got_sig and $got_sig eq "TERM")
231 0 0 if -d $dir
241 0 3 unless kill $sig, $pid
259 3 200 if $check
263 1 199 if (not $escalated and $delta > 2)
268 0 200 if $delta > 5
273 0 3 unless $check
274 0 3 if $check < 0
275 0 3 if $pid != $check
286 0 2 unless kill $sig, $pid
296 0 2 unless defined $kill_after and $kill_after =~ /^\d+$/ and $kill_after > 0
310 0 2 $kill_after > 1 ? :
321 2 32 if ($delta >= $fast_at and not $sent_fast)
327 1 33 if ($delta >= $kill_at and not $sent_kill)
328 1 0 unless $fast_sig eq "KILL"
336 2 32 if $check
337 0 32 if $delta > $give_up
342 0 2 unless $check
343 0 2 if $check < 0
344 0 2 if $pid != $check
358 0 0 if $self->{'stopped'}++ or $self->{'eliminated'}
359 0 0 unless my $pid = $self->{'watcher_pid'}
365 0 0 if $self->{'eliminated'}++ or $self->{'stopped'}
366 0 0 unless my $pid = $self->{'watcher_pid'}
377 0 0 if $self->{'eliminated'}++ or $self->{'stopped'}
378 0 0 unless my $pid = $self->{'watcher_pid'}
384 0 0 if $self->{'detached'}++
385 0 0 if $self->{'stopped'} or $self->{'eliminated'}
386 0 0 unless my $pid = $self->{'watcher_pid'}
392 0 0 unless my $pid = $self->{'watcher_pid'}
400 0 0 unless defined $grace and $grace =~ /^\d+$/ and $grace > 0
406 0 0 if ($waited > $timeout)
421 0 0 if ($self->{'master_pid'} == $$) { }
426 0 0 if $self->{'log_file'}