summaryrefslogtreecommitdiff
path: root/lib/perl5db.pl
diff options
context:
space:
mode:
authorJohn E. Malmberg <wb8tyw@qsl.net>2006-11-18 18:07:17 -0500
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-11-20 14:51:46 +0000
commit55f4245edad4e38b1869f0a6467a997a59257a0f (patch)
tree096d9625aa2294ce7f632c18040813bfdcbb21ff /lib/perl5db.pl
parentf46c40814880c71fd883cf2eabf29259a3236f08 (diff)
downloadperl-55f4245edad4e38b1869f0a6467a997a59257a0f.tar.gz
[patch@29297] perl5db.pl detecting forked debugger on VMS.
From: "John E. Malmberg" <wb8tyw@qsl.net> Message-ID: <455FD875.8050007@qsl.net> p4raw-id: //depot/perl@29326
Diffstat (limited to 'lib/perl5db.pl')
-rw-r--r--lib/perl5db.pl18
1 files changed, 15 insertions, 3 deletions
diff --git a/lib/perl5db.pl b/lib/perl5db.pl
index 60f36da4a5..2c2f923f31 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 {