in reply to DProf and forked processes
mod_perl does this in the Apache::DProf module. Unfortunately, I'm not certain how to do it without using C code. It might be as simple as changing where DProf is writing it's file. Try looking at the setting of PERL_DPROF_OUT_FILE_NAME (perldoc DProf). You might need to actually call some function within DProf to set this mid-stream.