summaryrefslogtreecommitdiffstats
path: root/mdkapplet
diff options
context:
space:
mode:
Diffstat (limited to 'mdkapplet')
-rwxr-xr-xmdkapplet15
1 files changed, 8 insertions, 7 deletions
diff --git a/mdkapplet b/mdkapplet
index 237d1ae9..bfb45927 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -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;