summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rwxr-xr-xmgaapplet5
2 files changed, 6 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index a8f4bc66..906b5c5b 100644
--- a/NEWS
+++ b/NEWS
@@ -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))
diff --git a/mgaapplet b/mgaapplet
index cd5636e4..a0af5998 100755
--- a/mgaapplet
+++ b/mgaapplet
@@ -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();