summaryrefslogtreecommitdiff
path: root/lib/perl5db.pl
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>2002-04-01 19:30:31 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2002-04-02 15:01:34 +0000
commitbf15e14c329c58d53cd425c0a506d27028d00e38 (patch)
tree4ca192a10da159360fc0699bd615344104ab2f16 /lib/perl5db.pl
parent4c070e31d0c37810963f30cdcfe02fcccd330ea6 (diff)
downloadperl-bf15e14c329c58d53cd425c0a506d27028d00e38.tar.gz
debugger again
Message-ID: <20020402003030.A8567@math.ohio-state.edu> p4raw-id: //depot/perl@15681
Diffstat (limited to 'lib/perl5db.pl')
-rw-r--r--lib/perl5db.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/perl5db.pl b/lib/perl5db.pl
index 6e9a9d5e4d..71cdb4a1db 100644
--- a/lib/perl5db.pl
+++ b/lib/perl5db.pl
@@ -2242,6 +2242,9 @@ sub os2_get_fork_TTY {
$ENV{PERL5OPT} =~ s/(?:^|(?<=\s))-d\b// if $ENV{PERL5OPT};
$ENV{PERL5OPT} =~ s/(?:^|(?<=\s))-d\B/-/ if $ENV{PERL5OPT};
print $OUT "Making kid PERL5OPT->`$ENV{PERL5OPT}'.\n" if $ENV{PERL5OPT};
+ local $ENV{PERL5LIB} = $ENV{PERL5LIB} ? $ENV{PERL5LIB} : $ENV{PERLLIB};
+ $ENV{PERL5LIB} = '' unless defined $ENV{PERL5LIB};
+ $ENV{PERL5LIB} = join ';', @ini_INC, split /;/, $ENV{PERL5LIB};
(my $name = $0) =~ s,^.*[/\\],,s;
my @args;
if ( pipe $in1, $out1 and pipe $in2, $out2
@@ -2250,6 +2253,8 @@ sub os2_get_fork_TTY {
and @args = ($rl, fileno $in1, fileno $out2,
"Daughter Perl debugger $pids $name") and
(($kpid = CORE::system 4, $^X, '-we', <<'ES', @args) >= 0 # P_SESSION
+END {sleep 5 unless $loaded}
+BEGIN {open STDIN, '</dev/con' or warn "reopen stdin: $!"}
use OS2::Process;
my ($rl, $in) = (shift, shift); # Read from $in and pass through