summaryrefslogtreecommitdiffstats
path: root/mdkapplet
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2006-04-06 17:22:05 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2006-04-06 17:22:05 +0000
commit3b9a5a15bcc3a14543e43608f49bded1b034217d (patch)
tree81ef31160f1fc6ba5da5e50c8832095ca2fd7415 /mdkapplet
parent5ac2389a3006bee6c88fcc0e3e0695b2b855cfbb (diff)
downloadmgaonline-3b9a5a15bcc3a14543e43608f49bded1b034217d.tar
mgaonline-3b9a5a15bcc3a14543e43608f49bded1b034217d.tar.gz
mgaonline-3b9a5a15bcc3a14543e43608f49bded1b034217d.tar.bz2
mgaonline-3b9a5a15bcc3a14543e43608f49bded1b034217d.tar.xz
mgaonline-3b9a5a15bcc3a14543e43608f49bded1b034217d.zip
Not all platforms automatically reinstall their (native) signal
handlers after a signal delivery (aka the handler works only the first time the signal is sent). Let's use "POSIX" signal handlers since their behaviour is well-defined.
Diffstat (limited to 'mdkapplet')
-rwxr-xr-xmdkapplet8
1 files changed, 7 insertions, 1 deletions
diff --git a/mdkapplet b/mdkapplet
index f0661dbd..d245f900 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -165,7 +165,13 @@ $icon->show_all;
$SIG{USR1} = 'IGNORE';
$SIG{USR2} = 'IGNORE';
$SIG{CHLD} = \&harvester;
-$SIG{HUP} = \&restart_applet;
+
+# POSIX unmasks the sigprocmask properly
+my $sigset = POSIX::SigSet->new;
+my $action = POSIX::SigAction->new('restart_applet',
+ $sigset,
+ &POSIX::SA_NODEFER);
+POSIX::sigaction(&POSIX::SIGHUP, $action);
Glib::Timeout->add(200, sub { harvester('CHLD', 1); 1 });