Branch Coverage

blib/lib/FCGI/Daemon.pm
Criterion Covered Total %
branch 0 88 0.0


line true false branch
34 0 0 if pod2usage(-'verbose', $FCGI::Daemon::ARG[0], -'noperldoc', 1)
40 0 0 if ($FCGI::Daemon::ARG[0])
52 0 0 unless &getopts('hde:f:q:p:s:g:u:m:c:l:w:', \%o)
53 0 0 if $o{'h'}
56 0 0 if $o{'d'}
57 0 0 defined $o{'w'} ? :
58 0 0 defined $o{'q'} ? :
61 0 0 defined $o{'e'} ? :
65 0 0 if ($FCGI::Daemon::REAL_USER_ID == $FCGI::Daemon::EFFECTIVE_USER_ID and $FCGI::Daemon::EFFECTIVE_USER_ID == 0)
72 0 0 if $o{'fcgi_pm'}
74 0 0 if $o{'fcgi_pm'}
79 0 0 if ($o{'d'})
82 0 0 unless defined(my $pid = fork)
83 0 0 if $pid
84 0 0 unless eval { do { POSIX::setsid() } }
98 0 0 unless my $rqst = &FCGI::Request(\*STDIN, \*STDOUT, \*STDERR, \%req_env, scalar &FCGI::OpenSocket($o{'sockfile'}, $o{'prefork'} * $o{'queue'}), 1)
102 0 0 if (defined $o{'gid_num'} and defined $o{'uid_num'})
104 0 0 unless chown $o{'uid_num'}, $o{'gid_num'}, $o{'sockfile'}
110 0 0 if (defined $o{'gid_num'} and defined $o{'uid_num'})
119 0 0 unless &setrlimit(scalar RLIMIT_AS(), $o{'rlimit_vmem'}, $o{'rlimit_vmem'})
121 0 0 unless &setrlimit(scalar RLIMIT_CPU(), $o{'rlimit_cpu'}, $o{'rlimit_cpu'})
133 0 0 unless (-x -s -r $req_env{'SCRIPT_FILENAME'})
142 0 0 if $req_env{'SCRIPT_FILENAME'} =~ m[^(.*)\/]u
145 0 0 if ($o{'max_evals'} > 0 and $req_env{'SCRIPT_FILENAME'} =~ /$o{'file_pattern'}\z/u)
153 0 0 if ($EVAL_ERROR)
155 0 0 unless $EVAL_ERROR =~ /^notr3a11yeXit/u
168 0 0 if exists $allvars{$_}
169 0 0 if /::$/u
170 0 0 if /^_/u
174 0 0 if (open my $STAT, '<', "/proc/$$/status")
182 0 0 if ($stat{'VmSize'} / $stat{'VmRSS'} < $o{'leak_threshold'})
188 0 0 unless --$o{'max_evals'}
199 0 0 unless (defined $pid)
206 0 0 if (not $pid) { }
208 0 0 unless open *STDIN, '<&=', $CIN
209 0 0 unless open *STDERR, '>&=', $CERR
210 0 0 unless exec $req_env{'SCRIPT_FILENAME'}
219 0 0 if ($req_env{'REQUEST_METHOD'} eq 'POST' and $req_env{'CONTENT_LENGTH'} != 0)
223 0 0 if $bytes == 0 or not defined $bytes
232 0 0 if (0 == sysread($FH, $buffer, 4096)) { }
236 0 0 $FH == $COUT ? :
252 0 0 if $p{$name} ne ''
263 0 0 if $_ eq ''
265 0 0 if -f -s $file