in reply to Re: Profiling forking code?
in thread Profiling forking code?
It looks as if the child will have to be started with that environment variable localized.
Update: I have tried it now, couldn't work it without going through the shell,
file prof.pl:
file profc.pl:#!/usr/bin/perl -d:DProf { local $ENV{PERL_DPROF_OUT_FILE_NAME} = "foo.out"; my $cpid = open my $foo, '|-', '/usr/bin/perl -d:DProf profc.pl' o +r die $!; } print 'In Parent', $/ or die $!; sleep 10;
$ ./prof.pl#!/usr/bin/perl print 'In Child',$/ or die $!; sleep 10;
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Profiling forking code?
by BrowserUk (Patriarch) on Jan 13, 2003 at 19:22 UTC |