summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2014-01-08 04:10:26 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2014-01-08 04:22:03 +0100
commitba9e231906396de7c7a16d52474b9a7524baea07 (patch)
tree10aea11f455b1968ea8d9f555c5b08395aecce6c
parenta498acd59ffa2455b05fd6f212da87b9db0f839c (diff)
downloadcontrol-center-ba9e231906396de7c7a16d52474b9a7524baea07.tar
control-center-ba9e231906396de7c7a16d52474b9a7524baea07.tar.gz
control-center-ba9e231906396de7c7a16d52474b9a7524baea07.tar.bz2
control-center-ba9e231906396de7c7a16d52474b9a7524baea07.tar.xz
control-center-ba9e231906396de7c7a16d52474b9a7524baea07.zip
better fix for segfault on startup (mga#10289)
just block the CHLD signal during the window where glib/webkit create threads behind our back (RT-120951)
-rw-r--r--NEWS2
-rwxr-xr-xcontrol-center10
2 files changed, 6 insertions, 6 deletions
diff --git a/NEWS b/NEWS
index 64b7b7e8..c35aae2f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- better fix for segfault on startup (mga#10289)
+
Version 12.49 - 28 January 2014, Thierry Vignaud
- delay starting up logdrake, thus fixing segfault on startup when "Display
diff --git a/control-center b/control-center
index 2365a085..f3144daa 100755
--- a/control-center
+++ b/control-center
@@ -30,6 +30,9 @@ use common;
use detect_devices;
use lang;
use feature 'state';
+use POSIX qw(:signal_h :sys_utsname_h :math_h :sys_wait_h :unistd_h);
+
+POSIX::sigprocmask(SIG_BLOCK, POSIX::SigSet->new(SIGCHLD));
# i18n: IMPORTANT: to get correct namespace (drakconf instead of libDrakX)
BEGIN { unshift @::textdomains, 'drakconf' }
@@ -759,7 +762,6 @@ my $accel = Gtk2::AccelGroup->new;
$accel->connect(Gtk2::Gdk->keyval_from_name('F1'), [], ['visible'], \&run_help);
$window_global->add_accel_group($accel);
-use POSIX qw(:sys_utsname_h :math_h :sys_wait_h :unistd_h);
my (undef, $nodename) = POSIX::uname();
$window_global->set_title(N("%s Control Center %s [on %s]", $branding, $version, $nodename));
$window_global->set_position('center');
@@ -1206,11 +1208,6 @@ my $pid_exp;
sub fork_ {
my ($prog, $o_pid_table) = @_;
- state $done;
- if (!$done) {
- $done = 1;
- $SIG{CHLD} = \&sig_child;
- }
$o_pid_table ||= \@pid_launched;
my $pid = fork();
if (defined $pid) {
@@ -1240,6 +1237,7 @@ sub run_tool {
if (!$done) {
$done = 1;
$SIG{CHLD} = \&sig_child;
+ POSIX::sigprocmask(SIG_UNBLOCK, POSIX::SigSet->new(SIGCHLD));
}
my $will_run_gurpmi;
if (! -x real_bin_path($exec)) {