Branch Coverage

blib/lib/System/Daemon/Utils.pm
Criterion Covered Total %
branch 22 70 31.4


line true false branch
18 0 0 if ($params{'group'})
20 0 0 unless ($gid)
23 0 0 unless (setgid($gid))
28 0 0 if ($params{'user'})
30 0 0 unless ($uid)
33 0 0 unless (setuid($uid))
46 0 0 unless ($params{'user'} or $params{'group'})
50 0 0 if ($user)
52 0 0 unless ($uid)
58 0 0 if ($group)
60 0 0 unless ($gid)
66 0 0 if ($err)
75 1 2 if fork
77 1 1 if fork
87 0 1 unless $pid
89 1 0 unless (-e $pid)
92 0 1 unless (open PID, '>', $pid)
111 0 1 unless $pidfile
118 0 1 if ($owner{'user'} or $owner{'group'})
122 0 0 unless chown $uid, $gid, $pidfile
133 0 4 unless $pidfile
135 1 3 unless -e $pidfile
140 1 2 unless $pid
147 0 2 unless $res
156 1 1 unless unlink $pidfile
173 0 1 unless $pidfile
178 1 0 if (-e $path)
180 0 1 unless (-d $path)
187 0 0 if ($mkdir)
199 0 2 unless $pid
200 2 0 if ($pid =~ /^\d*$/s)
210 0 0 unless $pidfile_full
214 0 0 if (-e $path)
218 0 0 unless mkdir $path
220 0 0 if ($daemon_data->{'user'} or $daemon_data->{'group'})