This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update debugger version number and Changes file
[perl5.git] / lib / perl5db.pl
index 7c8507c..c2610e3 100644 (file)
@@ -1,7 +1,9 @@
 package DB;
 
+use IO::Handle;
+
 # Debugger for Perl 5.00x; perl5db.pl patch level:
-$VERSION = 1.20;
+$VERSION = 1.21;
 $header  = "perl5db.pl version $VERSION";
 
 # It is crucial that there is no lexicals in scope of `eval ""' down below
@@ -322,6 +324,8 @@ sub eval {
 # Changes: 1.20: Feb 17, 2003 Richard Foley <richard.foley@rfi.net>
 #   + pre'n'post commands no longer trashed with no args
 #   + watch val joined out of eval()
+# Changes: 1.21: Dec 21, 2003 Dominique Quatravaux
+#   + Fix a side-effect of bug #24674 in the perl debugger ("odd taint bug")
 # 
 ####################################################################
 
@@ -534,6 +538,9 @@ if ( not defined &get_fork_TTY and defined $ENV{TERM} and $ENV{TERM} eq 'xterm'
 } elsif ($^O eq 'os2') {
     *get_fork_TTY = \&os2_get_fork_TTY;
 }
+# untaint $^O, which may have been tainted by the last statement.
+# see bug [perl #24674]
+$^O =~ m/^(.*)\z/; $^O = $1;
 
 # Here begin the unreadable code.  It needs fixing.
 
@@ -1269,6 +1276,8 @@ EOP
                $onetimeDump = undef;
                 $onetimedumpDepth = undef;
            } elsif ($term_pid == $$) {
+               STDOUT->flush();
+               STDERR->flush();
                print $OUT "\n";
            }
        } continue {            # CMD: