diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-05-23 18:26:36 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-05-23 18:26:36 +0000 |
commit | f3d731b3893b5cc42a38f808c41ba566ad82ff1a (patch) | |
tree | 69ade676fd025c8867423e469b5af5c9acb57e44 | |
parent | 958fbadca6ed6ee3feb95accb5b605ba4b468112 (diff) | |
download | drakx-backup-do-not-use-f3d731b3893b5cc42a38f808c41ba566ad82ff1a.tar drakx-backup-do-not-use-f3d731b3893b5cc42a38f808c41ba566ad82ff1a.tar.gz drakx-backup-do-not-use-f3d731b3893b5cc42a38f808c41ba566ad82ff1a.tar.bz2 drakx-backup-do-not-use-f3d731b3893b5cc42a38f808c41ba566ad82ff1a.tar.xz drakx-backup-do-not-use-f3d731b3893b5cc42a38f808c41ba566ad82ff1a.zip |
(sig_segv_handler) split it out of main()
-rw-r--r-- | perl-install/install/install2.pm | 20 |
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; |