summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-09-13 20:51:58 +0000
committerThierry Vignaud <tv@mandriva.org>2007-09-13 20:51:58 +0000
commited9a61b3f2b1cab6d19ca2e80ff86ccae268917b (patch)
tree9aa18a42459c7b574276c2823479414e46f994a0
parentcc8b43a1492a8397a59b698dab169f169628a2f1 (diff)
downloaddrakx-ed9a61b3f2b1cab6d19ca2e80ff86ccae268917b.tar
drakx-ed9a61b3f2b1cab6d19ca2e80ff86ccae268917b.tar.gz
drakx-ed9a61b3f2b1cab6d19ca2e80ff86ccae268917b.tar.bz2
drakx-ed9a61b3f2b1cab6d19ca2e80ff86ccae268917b.tar.xz
drakx-ed9a61b3f2b1cab6d19ca2e80ff86ccae268917b.zip
(bug_handler) distinct exceptions from SEGV, thus restoring catching
SEGV and preventing looping while segfaulting again
-rw-r--r--perl-install/NEWS2
-rw-r--r--perl-install/standalone.pm8
2 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 5a3572b3a..d50b945b7 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,5 @@
+- distinct exceptions from segfaults, thus restoring catching SIGSEGV
+ and preventing looping while segfaulting again
- fix loading of tifm_sd module (#18237)
Version 10.4.193 - 13 September 2007, by Thierry Vignaud
diff --git a/perl-install/standalone.pm b/perl-install/standalone.pm
index 62ff33c59..824ec46ed 100644
--- a/perl-install/standalone.pm
+++ b/perl-install/standalone.pm
@@ -190,13 +190,13 @@ our @builtin_functs = qw(chmod chown __exit exit unlink link symlink rename syst
our @drakx_modules = qw(Xconfig::card Xconfig::default Xconfig::main Xconfig::monitor Xconfig::parse Xconfig::proprietary Xconfig::resolution_and_depth Xconfig::screen Xconfig::test Xconfig::various Xconfig::xfree any bootloader bootlook c commands crypto detect_devices devices diskdrake diskdrake::hd_gtk diskdrake::interactive diskdrake::removable diskdrake::removable_gtk diskdrake::smbnfs_gtk fs fsedit http keyboard lang log loopback lvm modules::parameters modules mouse my_gtk network network::adsl network::ethernet network::connection network::isdn_consts network::isdn network::modem network::netconnect network::network fs::remote::nfs fs::remote::smb network::tools partition_table partition_table_bsd partition_table::dos partition_table::empty partition_table::gpt partition_table::mac partition_table::raw partition_table::sun printer printerdrake proxy raid run_program scanner services steps swap timezone network::drakfirewall network::shorewall);
sub bug_handler {
- my ($error) = @_;
+ my ($error, $is_signal) = @_;
# exceptions in eval are OK:
- return if $error && $^S;
+ return if $error && $^S && !$is_signal;
# exceptions with "\n" are normal ways to quit:
- if ($error eq MDK::Common::String::formatError($error)) {
+ if (!$is_signal && $error eq MDK::Common::String::formatError($error)) {
warn $error;
exit(255);
}
@@ -215,7 +215,7 @@ sub bug_handler {
exec('drakbug', if_($error, '--error', $error), '--incident', $progname,);
}
-$SIG{SEGV} = \&bug_handler;
+$SIG{SEGV} = sub { bug_handler(@_, 1) };
$SIG{__DIE__} = \&bug_handler;
sub import() {