diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2006-04-06 17:22:05 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2006-04-06 17:22:05 +0000 |
commit | 3b9a5a15bcc3a14543e43608f49bded1b034217d (patch) | |
tree | 81ef31160f1fc6ba5da5e50c8832095ca2fd7415 /mdkapplet | |
parent | 5ac2389a3006bee6c88fcc0e3e0695b2b855cfbb (diff) | |
download | mgaonline-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-x | mdkapplet | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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 }); |