line |
l |
!l&&r |
!l&&!r |
condition |
13
|
0 |
0 |
2 |
%{$self->pids;} || $self->{'tid'} |
28
|
0 |
0 |
0 |
$self->{'ev'}{$pid} ||= EV::child($pid, 0, sub {
$self->_exit($pid, (shift())->rstatus);
}
) |
41
|
35 |
0 |
27 |
$kid == $pid or $kid == -1 |
44
|
24 |
12 |
0 |
$self->{'tid'} ||= "Mojo::IOLoop"->recurring("0.05", sub {
my $ioloop = shift();
my $pids = $self->pids;
return $ioloop->remove(delete $self->{'tid'}) unless %$pids;
foreach my $pid (keys %$pids) {
local($?, $!);
my $kid = CORE::waitpid($pid, 1);
$self->_exit($pid, $?) if $kid == $pid or $kid == -1;
};
}
) |