From a498acd59ffa2455b05fd6f212da87b9db0f839c Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 8 Jan 2014 04:21:42 +0100 Subject: move SIG_CHLD handler from fork_() into run_tool() rationale: in next commit, we will block SIG_CHLD at startup then simplify starting logdrake, meaning fork() would unblock SIG_CHLD too early if "display logs" option is on --- control-center | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/control-center b/control-center index f72431d8..2365a085 100755 --- a/control-center +++ b/control-center @@ -1236,6 +1236,11 @@ sub run_tool { my ($exec, $gtkplug) = @$tool{qw(binary embedded)}; $application_driven_menu = $tool->{application_driven_menu}; return if $tool_pids{$label}; + state $done; + if (!$done) { + $done = 1; + $SIG{CHLD} = \&sig_child; + } my $will_run_gurpmi; if (! -x real_bin_path($exec)) { if ($tool->{packages2install}) { -- cgit v1.2.1