summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2014-01-22 21:07:47 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2014-01-22 21:09:26 +0100
commit4ec5b7cec36a3435e970022d4542ac2158dd6d2b (patch)
treedf5f6bfbb227afc17d035315d2b8981fdd81da0b
parentbeabf25f3b9f6d564f0b290dbcd35b575e9133ec (diff)
downloadmgaonline-4ec5b7cec36a3435e970022d4542ac2158dd6d2b.tar
mgaonline-4ec5b7cec36a3435e970022d4542ac2158dd6d2b.tar.gz
mgaonline-4ec5b7cec36a3435e970022d4542ac2158dd6d2b.tar.bz2
mgaonline-4ec5b7cec36a3435e970022d4542ac2158dd6d2b.tar.xz
mgaonline-4ec5b7cec36a3435e970022d4542ac2158dd6d2b.zip
block CHLD signals on startup
in order to prevent glib-threading segfaults (mga#10289), just block the CHLD signal during the window where glib create threads behind our back (RT-120951)
-rw-r--r--NEWS3
-rwxr-xr-xmgaapplet5
2 files changed, 7 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 9115857e..90c7319f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- block CHLD signals on startup in order to prevent glib-threading segfaults
+ (mga#10289)
+
Version 3.7.1 - 22 January 2014, Thierry Vignaud
- better fix for mga#12280 while fixing mgaapplet exiting reported by
diff --git a/mgaapplet b/mgaapplet
index 8d4deaa2..27a6925d 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;
@@ -41,6 +41,8 @@ use Gtk3::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) {
@@ -207,6 +209,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();