diff options
author | Chip Salzenberg <chip@perl.com> | 1997-02-25 13:58:14 +1200 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1997-02-25 13:12:02 +1200 |
commit | ee85b803feacbb40e8592bf6e4ffe4e533862c00 (patch) | |
tree | 92aea3aa31bf8e0dc5f662325d488712a052f999 /lib/perl5db.pl | |
parent | cc5a7fd744db25bba816668d934a71968a0f09fc (diff) | |
download | perl-ee85b803feacbb40e8592bf6e4ffe4e533862c00.tar.gz |
Don't require() in a signal handler
Diffstat (limited to 'lib/perl5db.pl')
-rw-r--r-- | lib/perl5db.pl | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/perl5db.pl b/lib/perl5db.pl index 738937fa5f..11d0de7bf4 100644 --- a/lib/perl5db.pl +++ b/lib/perl5db.pl @@ -2,7 +2,7 @@ package DB; # Debugger for Perl 5.00x; perl5db.pl patch level: -$VERSION = 0.9905; +$VERSION = 0.9906; $header = "perl5db.pl patch level $VERSION"; # Enhanced by ilya@math.ohio-state.edu (Ilya Zakharevich) @@ -1736,11 +1736,14 @@ sub diesignal { local $doret = -2; $SIG{'ABRT'} = 'DEFAULT'; kill 'ABRT', $$ if $panic++; - print $DB::OUT "Got $_[0]!\n"; # in the case cannot continue - local $SIG{__WARN__} = ''; - require Carp; - local $Carp::CarpLevel = 2; # mydie + confess - &warn(Carp::longmess("Signal @_")); + if (defined &Carp::longmess) { + local $SIG{__WARN__} = ''; + local $Carp::CarpLevel = 2; # mydie + confess + &warn(Carp::longmess("Signal @_")); + } + else { + print $DB::OUT "Got signal @_\n"; + } kill 'ABRT', $$; } |