… | … | ||
---|---|---|---|
49 | } | 49 | } |
50 | 50 | ||
51 | sub child { | 51 | sub child { |
52 | my ($class, %arg) = @_; | 52 | my ($class, %arg) = @_; |
53 | 53 | ||
54 | my $cb = $arg{cb}; | ||
55 | |||
54 | EV::child $arg{pid}, $arg{cb} | 56 | EV::child $arg{pid}, sub { |
57 | $cb->($_[0]->rpid, $_[0]->rstatus); | ||
58 | } | ||
55 | } | 59 | } |
56 | 60 | ||
57 | sub condvar { | 61 | sub condvar { |
58 | bless \my $flag, "EV::AnyEvent" | 62 | bless \my $flag, "EV::AnyEvent" |
59 | } | 63 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |