--- cvsroot/Coro/Coro.pm 2012/10/08 23:16:15 1.310 +++ cvsroot/Coro/Coro.pm 2012/11/30 08:12:37 1.311 @@ -1131,7 +1131,7 @@ } In the case where C and C are not flexible enough, -you can roll your own, using C: +you can roll your own, using C and C: sub wait_for_child($) { my ($pid) = @_; @@ -1144,7 +1144,8 @@ # pass a closure to ->child my $watcher = AnyEvent->child (pid => $pid, cb => sub { $rstatus = $_[1]; # remember rstatus - $done = 1; # mark $rstatus as valud + $done = 1; # mark $rstatus as valid + $current->ready; # wake up the waiting thread }); # wait until the closure has been called