summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-05-23 18:26:36 +0000
committerThierry Vignaud <tv@mageia.org>2012-05-23 18:26:36 +0000
commita14b91302728610e6701fe1260c2396f0316b695 (patch)
tree69ade676fd025c8867423e469b5af5c9acb57e44 /perl-install
parent87133ece0463e026a8de3558f04eab3f7591d612 (diff)
downloaddrakx-a14b91302728610e6701fe1260c2396f0316b695.tar
drakx-a14b91302728610e6701fe1260c2396f0316b695.tar.gz
drakx-a14b91302728610e6701fe1260c2396f0316b695.tar.bz2
drakx-a14b91302728610e6701fe1260c2396f0316b695.tar.xz
drakx-a14b91302728610e6701fe1260c2396f0316b695.zip
(sig_segv_handler) split it out of main()
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install/install2.pm20
1 files changed, 11 insertions, 9 deletions
diff --git a/perl-install/install/install2.pm b/perl-install/install/install2.pm
index 3ff611c30..68e018644 100644
--- a/perl-install/install/install2.pm
+++ b/perl-install/install/install2.pm
@@ -334,19 +334,21 @@ sub init_local_install {
$o->{mouse} = mouse::fullname2mouse('Universal|Any PS/2 & USB mice');
}
+sub sig_segv_handler() {
+ my $msg = "segmentation fault: install crashed (maybe memory is missing?)\n" . backtrace();
+ log::l("$msg\n");
+ # perl_checker: require UNIVERSAL
+ UNIVERSAL::can($o, 'ask_warn') and $o->ask_warn('', $msg);
+ setVirtual(1);
+ require install::steps_auto_install;
+ install::steps_auto_install_non_interactive::errorInStep($o, $msg);
+}
+
#-######################################################################################
#- MAIN
#-######################################################################################
sub main {
- $SIG{SEGV} = sub {
- my $msg = "segmentation fault: install crashed (maybe memory is missing?)\n" . backtrace();
- log::l("$msg\n");
- # perl_checker: require UNIVERSAL
- UNIVERSAL::can($o, 'ask_warn') and $o->ask_warn('', $msg);
- setVirtual(1);
- require install::steps_auto_install;
- install::steps_auto_install_non_interactive::errorInStep($o, $msg);
- };
+ $SIG{SEGV} = \&sig_segv_handler;
$ENV{PERL_BADLANG} = 1;
delete $ENV{TERMINFO};
umask 022;