| line |
true |
false |
branch |
|
47
|
54 |
0 |
if ($cmd[0] =~ m[/]) { } |
|
48
|
0 |
54 |
unless -f $cmd[0] and -x _ |
|
52
|
0 |
0 |
unless length $dir and -d $dir |
|
53
|
0 |
0 |
unless -f "$dir/$cmd[0]" and -x _ |
|
57
|
0 |
0 |
unless $cmd[0] =~ m[/] |
|
106
|
64 |
1 |
if $ios |
|
107
|
0 |
65 |
unless close $fh |
|
122
|
44 |
0 |
unless $$proc{"fh$what"} and $$proc{"cb$what"} |
|
128
|
45 |
43 |
unless $$proc{"fh$what"} and $$proc{"cb$what"} |
|
135
|
0 |
50 |
unless defined $done |
|
150
|
44 |
1994 |
if (waitpid($proc->{'pid'}, 1) == $proc->{'pid'}) |
|
159
|
1994 |
0 |
if (kill 0, $proc->{'pid'} or $! == 1) |
|
174
|
43 |
11 |
unless defined $stdin |
|
176
|
6 |
5 |
if ($ref eq '') { } |
|
|
5 |
0 |
elsif ($ref eq 'SCALAR') { } |
|
177
|
0 |
6 |
if ($stdin eq '') { } |
|
181
|
0 |
6 |
unless open $rdrin, '<', $stdin |
|
185
|
0 |
5 |
unless pipe $rdrin, $wrtin |
|
199
|
2 |
52 |
unless defined $stdout |
|
201
|
8 |
44 |
if ($ref eq '') { } |
|
|
44 |
0 |
elsif ($ref eq 'CODE' or $ref eq 'SCALAR') { } |
|
202
|
0 |
8 |
if ($stdout eq '') { } |
|
206
|
0 |
8 |
unless open $wrtout, '>', $stdout |
|
210
|
0 |
44 |
unless pipe $rdrout, $wrtout |
|
213
|
0 |
44 |
if ($ref eq 'CODE') { } |
|
232
|
15 |
39 |
unless defined $stderr |
|
234
|
9 |
30 |
if ($ref eq '') { } |
|
|
30 |
0 |
elsif ($ref eq 'CODE' or $ref eq 'SCALAR') { } |
|
235
|
9 |
0 |
if ($stderr eq '') { } |
|
240
|
0 |
0 |
unless open $wrterr, '>', $stderr |
|
244
|
0 |
30 |
unless pipe $rdrerr, $wrterr |
|
247
|
0 |
30 |
if ($ref eq 'CODE') { } |
|
271
|
2 |
7 |
if ($rdrin) |
|
273
|
2 |
0 |
if (fileno STDIN != $fd) |
|
274
|
0 |
2 |
unless open *STDIN, "<&=$fd" |
|
279
|
8 |
1 |
if ($wrtout) |
|
281
|
8 |
0 |
if (fileno STDOUT != $fd) |
|
282
|
0 |
8 |
unless open *STDOUT, ">&=$fd" |
|
287
|
6 |
3 |
if ($wrterr or $merge) |
|
288
|
1 |
5 |
$merge ? : |
|
289
|
6 |
0 |
if (fileno STDERR != $fd) |
|
290
|
0 |
6 |
unless open *STDERR, ">&=$fd" |
|
321
|
0 |
54 |
if (defined $option{'cwd'}) |
|
322
|
0 |
0 |
unless -d $option{'cwd'} |
|
330
|
0 |
54 |
unless defined $proc{'pid'} |
|
336
|
9 |
45 |
unless ($proc{'pid'}) |
|
340
|
0 |
9 |
if defined $option{'cwd'} |
|
343
|
27 |
0 |
unless tied $glob |
|
349
|
14 |
13 |
unless $fh |
|
350
|
0 |
13 |
unless close $fh |
|
356
|
0 |
0 |
unless exec {$proc{'command'}[0];} @{$proc{'command'};} |
|
367
|
6 |
39 |
if (defined $option{'timeout'}) |
|
371
|
0 |
45 |
if $option{'kill'} |
|
374
|
57 |
78 |
unless $fh |
|
375
|
0 |
78 |
unless close $fh |
|
396
|
0 |
7 |
if (ref $proc eq '') { } |
|
|
7 |
0 |
elsif (ref $proc eq 'HASH') { } |
|
397
|
0 |
0 |
unless $proc =~ /^\d+$/ |
|
404
|
6 |
1 |
if @_ |
|
409
|
7 |
0 |
if ($spec =~ m[^([A-Z]+)/($nbre)$]) { } |
|
414
|
0 |
7 |
unless (kill $sig, $pid) |
|
415
|
0 |
0 |
unless $! == 3 |
|
419
|
7 |
7 |
unless &_is_alive($proc, $option{'_iosr'}, $option{'_iosw'}) |
|
422
|
0 |
0 |
unless &_is_alive($proc, $option{'_iosr'}, $option{'_iosw'}) |
|
426
|
0 |
0 |
unless (kill $sig, $pid) |
|
427
|
0 |
0 |
unless $! == 3 |
|
450
|
73 |
65 |
unless $fh |
|
451
|
4 |
61 |
if ($what eq 'in') { } |
|
459
|
8 |
36 |
unless $iosr->count |
|
460
|
40 |
4 |
unless $iosw->count |
|
476
|
0 |
57 |
unless defined $done |
|
480
|
18 |
39 |
unless ($done) |
|
496
|
4 |
4 |
if (length $buf) { } |
|
498
|
0 |
4 |
unless defined $done |
|
517
|
1987 |
37 |
if &_is_alive($proc, $iosr, $iosw) |
|
523
|
258 |
6 |
unless $now > $proc->{'maxtime'} |
|
551
|
42 |
2 |
if (ref $procs eq 'HASH') { } |
|
|
0 |
2 |
elsif (ref $procs ne 'ARRAY') { } |
|
556
|
2 |
42 |
if @_ |
|
567
|
1 |
43 |
if defined $option{'timeout'} |
|
573
|
1431 |
553 |
if $iosr |
|
576
|
8 |
1976 |
if $iosw |
|
580
|
0 |
1984 |
if $maxtime and &Time::HiRes::time() > $maxtime |
|
584
|
1 |
1983 |
if $option{'deaths'} and grep(defined($_->{'status'}), values %{$process;}) >= $zombies + $option{'deaths'} |
|
586
|
1924 |
59 |
if $timeout |
|
588
|
588 |
1395 |
unless $iosr and $iosr->count |
|
589
|
1979 |
4 |
unless $iosw and $iosw->count |
|
606
|
6 |
36 |
if wantarray |
|
620
|
0 |
3 |
if $status |
|
635
|
0 |
0 |
if @_ |
|
640
|
0 |
0 |
unless defined $pid |
|
641
|
0 |
0 |
if ($pid) |
|
644
|
0 |
0 |
if $option{'callback'} |
|
649
|
0 |
0 |
if $sid == -1 |
|
651
|
0 |
0 |
unless (-f STDIN) |
|
652
|
0 |
0 |
unless open STDIN, '<', '/dev/null' |
|
655
|
0 |
0 |
unless (-f STDOUT) |
|
656
|
0 |
0 |
unless open STDOUT, '>', '/dev/null' |
|
659
|
0 |
0 |
unless (-f STDERR) |
|
660
|
0 |
0 |
unless open STDERR, '>', '/dev/null' |