Branch Coverage

blib/lib/MooseX/Daemonize/Core.pm
Criterion Covered Total %
branch 23 32 71.8


line true false branch
49 2 49 if defined $options{$opt}
59 2 9 if $self->ignore_zombies
62 5 6 if (my $pid = fork) { }
74 5 6 unless $self->is_daemon
79 0 6 unless POSIX::setsid()
82 6 0 unless ($self->no_double_fork)
84 3 3 if fork
90 3 0 unless ($self->dont_close_all_files)
93 0 3 if not defined $openmax or $openmax < 0
101 0 3 unless open STDIN, '+>/dev/null'
106 2 1 if (my $stdout_file = $ENV{'MX_DAEMON_STDOUT'}) { }
107 0 2 unless open STDOUT, '>', $stdout_file
111 0 1 unless open STDOUT, '+>&STDIN'
117 2 1 if (my $stderr_file = $ENV{'MX_DAEMON_STDERR'}) { }
118 0 2 unless open STDERR, '>', $stderr_file
122 0 1 unless open STDERR, '+>&STDIN'