diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2014-01-22 21:07:47 +0100 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2014-01-24 06:22:10 +0100 |
commit | 7597a033b03c5e86531ce59ee44f714dbae07018 (patch) | |
tree | 3ddf7960813360fd3722ab72a6d971c4ff61f44b | |
parent | 8e6a3f840cf1e9141942e93c757e1bc21732c91e (diff) | |
download | mgaonline-7597a033b03c5e86531ce59ee44f714dbae07018.tar mgaonline-7597a033b03c5e86531ce59ee44f714dbae07018.tar.gz mgaonline-7597a033b03c5e86531ce59ee44f714dbae07018.tar.bz2 mgaonline-7597a033b03c5e86531ce59ee44f714dbae07018.tar.xz mgaonline-7597a033b03c5e86531ce59ee44f714dbae07018.zip |
block CHLD signals on startup (mga#11492)
in order to prevent glib-threading segfaults (mga#11492), just block the
CHLD signal during the window where glib create threads behind our back
(RT-120951)
Conflicts:
NEWS
-rw-r--r-- | NEWS | 2 | ||||
-rwxr-xr-x | mgaapplet | 5 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,5 @@ +- block CHLD signals on startup in order to prevent glib-threading segfaults + (mga#11492) - delay setting SIG_CHLD handler (thus fixing segfault on startup (mga#11492)) @@ -22,7 +22,7 @@ ################################################################################ use strict; -use POSIX ":sys_wait_h"; +use POSIX qw(:signal_h :sys_wait_h); use lib qw(/usr/lib/libDrakX); use standalone; # for explanations use common; @@ -40,6 +40,8 @@ use Gtk2::Notify '-init', 'mgaapplet'; use Net::DBus qw(:typing); use Rpmdrake::open_db; +POSIX::sigprocmask(SIG_BLOCK, POSIX::SigSet->new(SIGCHLD)); + if (!find { $_ eq '--auto-update' } @ARGV) { if (my $pid = mgaonline::is_running('mgaapplet')) { if ($::testing) { @@ -243,6 +245,7 @@ shouldStart() or die "$localfile should be set to TRUE: please use --force or -f go2State('delayed'); Glib::Timeout->add_seconds($config{FIRST_CHECK_DELAY}/1000, sub { + POSIX::sigprocmask(SIG_UNBLOCK, POSIX::SigSet->new(SIGCHLD)); $SIG{CHLD} = \&harvester; # schedule future checks: setup_cyclic_check(); |