This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Math::Big* test tweaks to work better with core:
[perl5.git] / lib / perl5db.pl
index aa475d8..aab1a68 100644 (file)
@@ -721,7 +721,7 @@ EOP
                            next CMD;
                        } 
                    }
-                   $cmd =~ /^q$/ && ($fall_off_end = 1) && exit $?;
+                   $cmd =~ /^q$/ && ($fall_off_end = 1) && clean_ENV() && exit $?;
                    $cmd =~ /^h$/ && do {
                        print_help($help);
                        next CMD; };
@@ -3008,6 +3008,14 @@ sub end_report {
   print $OUT "Use `q' to quit or `R' to restart.  `h q' for details.\n"
 }
 
+sub clean_ENV {
+    if (defined($ini_pids)) {
+        $ENV{PERLDB_PIDS} = $ini_pids;
+    } else {
+        delete($ENV{PERLDB_PIDS});
+    }
+}
+
 END {
   $finished = 1 if $inhibit_exit;      # So that some keys may be disabled.
   $fall_off_end = 1 unless $inhibit_exit;