diff options
Diffstat (limited to 'mdkapplet')
-rwxr-xr-x | mdkapplet | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -38,6 +38,14 @@ use mdkonline; use Gtk2::TrayIcon; use Gtk2::NotificationBubble; + +# 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); + if (!find { $_ eq '--auto-update' } @ARGV) { my $pid = mdkonline::is_running('mdkapplet'); $pid and die "mdkapplet already running ($pid)\n"; @@ -166,13 +174,6 @@ $SIG{USR1} = 'IGNORE'; $SIG{USR2} = 'IGNORE'; $SIG{CHLD} = \&harvester; -# 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 }); Gtk2->main; |