Branch Coverage

blib/lib/JIP/Daemon.pm
Criterion Covered Total %
branch 60 64 93.7


line true false branch
56 1 32 exists $param{'dry_run'} && $param{'dry_run'} ? :
59 4 29 if (exists $param{'uid'})
62 2 2 unless defined $uid and $uid =~ /^\d+$/x
67 4 27 if (exists $param{'gid'})
70 2 2 unless defined $gid and $gid =~ /^\d+$/x
75 4 25 if (exists $param{'cwd'})
78 2 2 unless defined $cwd and length $cwd
83 4 23 if (exists $param{'umask'})
86 2 2 unless defined $umask and length $umask
91 3 22 if (exists $param{'logger'})
94 1 2 unless defined $logger and $logger->can('info')
99 6 18 if (exists $param{'log_callback'}) { }
102 2 4 unless defined $log_callback and ref $log_callback eq 'CODE'
124 2 6 if $self->is_detached
127 4 2 if (not $self->dry_run) { }
132 1 3 unless defined $pid
135 2 1 if ($pid == 0) { }
136 1 1 unless POSIX::setsid()
164 0 1 unless open STDIN, '
166 0 1 unless open STDOUT, '>/dev/null'
168 0 1 unless open STDERR, '>/dev/null'
177 2 6 if (defined(my $uid = $self->uid))
179 1 1 unless POSIX::setuid($uid)
183 2 5 if (defined(my $gid = $self->gid))
185 1 1 unless POSIX::setgid($gid)
189 2 4 if (defined(my $umask = $self->umask))
191 1 1 unless POSIX::umask($umask)
195 2 3 if (defined(my $cwd = $self->cwd))
197 1 1 unless POSIX::chdir($cwd)
210 2 1 if (defined(my $pid = $self->pid)) { }
211 1 1 defined $signal ? :
223 1 0 POSIX::kill($pid, 0) ? :