[Thread Prev][Thread Next]   >Date Index >Thread Index

Re: Perl Debugger und fork

Richard Foley - Sun Sep 17 15:08:23 2006

On Sunday 17 September 2006 00:01, Wilfried Gänsheimer wrote:
> thought there
> might be a "perl -nod" switch to disable the debug mode (I know, we are 
> talking about fork; so that is not as simple).
Gotcha.  You mean: debug me, not my children - there is no such (-nodebug) 
switch, as far as I am aware, interesting idea though.

Hmm.  You could try setting the PERL5DB environment variable in the parent 
process, before starting the children, to load a different (null) debugger, 
and setting the debugger to run off the end.  That might work.  Something 
like this:  (untested)

$> cat myperl5db.pl
sub DB::DB { };

$> perl -d forkingprogram

DB> $ENV{PERL5DB} = "BEGIN { require 'myperl5db.pl' }"
DB> $ENV{PERLDB_OPTS} = "Auto=1 NonStop=1"
DB> c

Hopefully, now when the child process fork away, they will pick up your new 
(empty) debugger code, and do nothing.  Just an idea...?

Richard Foley
Ciao - shorter than aufwiedersehen