From: John E. Malmberg Date: Sat, 18 Nov 2006 23:07:17 +0000 (-0500) Subject: [patch@29297] perl5db.pl detecting forked debugger on VMS. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=55f4245edad4e38b1869f0a6467a997a59257a0f;p=p5sagit%2Fp5-mst-13.2.git [patch@29297] perl5db.pl detecting forked debugger on VMS. From: "John E. Malmberg" Message-ID: <455FD875.8050007@qsl.net> p4raw-id: //depot/perl@29326 --- diff --git a/lib/perl5db.pl b/lib/perl5db.pl index 60f36da..2c2f923 100644 --- a/lib/perl5db.pl +++ b/lib/perl5db.pl @@ -1317,9 +1317,21 @@ if ( defined $ENV{PERLDB_PIDS} ) { # We're a child. Make us a label out of the current PID structure # recorded in PERLDB_PIDS plus our (new) PID. Mark us as not having # a term yet so the parent will give us one later via resetterm(). - $pids = "[$ENV{PERLDB_PIDS}]"; - $ENV{PERLDB_PIDS} .= "->$$"; - $term_pid = -1; + + my $env_pids = $ENV{PERLDB_PIDS}; + $pids = "[$env_pids]"; + + # Unless we are on OpenVMS, all programs under the DCL shell run under + # the same PID. + + if (($^O eq 'VMS') && ($env_pids =~ /\b$$\b/)) { + $term_pid = $$; + } + else { + $ENV{PERLDB_PIDS} .= "->$$"; + $term_pid = -1; + } + } ## end if (defined $ENV{PERLDB_PIDS... else {