in reply to anyevent + fork = problem

Have a look at fork_call in AnyEvent::Util, it may help