in reply to Re^2: How to asynchronisly get notified of a child exit
in thread How to asynchronisly get notified of a child exit

If you use POE::Wheel::Run then you can run a sub in a separate forked process. That sub could run your existing f2() and then print something to STDOUT (say f2 done). The parent session in the parent process has something watching for output from that child wheel which sends itself a "f2done" event (and upon receiving that event it starts whatever was waiting for f2 to complete). It wouldn't be seamless, but it should be doable.

--
We're looking for people in ATL

Replies are listed 'Best First'.
Re^4: How to asynchronisly get notified of a child exit
by Mostly Harmless (Initiate) on Jul 08, 2005 at 05:44 UTC
    My existing routine prints everything to it's stdout, which is redirected to a log file before fork(). But I think I can use a different filehandle for communication. I'll dig up the doc. to see what POE does if a session blocks forever or a child exits abruptly. I think it'd also mean the application cannot use CHLD handlers, as it'd interfere with POE's.