in reply to Caught Forking() around again

I use Parallel::ForkManager for most of my forking these days.
it setup nice callbacks for Start/wait/finish of children

heres a snipit:
# when a childe spawns $pm->run_on_start( sub { my ($pid,$ident)=@_; log_report("Parent Starting Child $pid Sending to $ident"); }); # when a childe finishes $pm->run_on_finish( sub { my ($pid, $exit_code, $ident, $error) = @_; log_report( "Child at $pid completed on $ident with code:$exit +_code"); }); # while we wait.. $pm->run_on_wait( sub{log_report( "Waiting for children ..." );} );
of course this is pretty simplistic :-) read the docs for more info. I imagine you caould build up some sort of execution chain ? for a task then independentl;y walk that chain. assuming you know that task X requires task A and B.