diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2006-04-07 15:05:16 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2006-04-07 15:05:16 +0000 |
commit | e33aea3225f78a79a680884c806065b361829b73 (patch) | |
tree | bc31911864c3e200a5398d08b7d6d52030cc2b2a /mdkapplet | |
parent | edf373530a51c701dbb15310a85a120b49ad8b43 (diff) | |
download | mgaonline-e33aea3225f78a79a680884c806065b361829b73.tar mgaonline-e33aea3225f78a79a680884c806065b361829b73.tar.gz mgaonline-e33aea3225f78a79a680884c806065b361829b73.tar.bz2 mgaonline-e33aea3225f78a79a680884c806065b361829b73.tar.xz mgaonline-e33aea3225f78a79a680884c806065b361829b73.zip |
install SIGHUP handler earlier so that the applet supports a very high
restart frequency (only usefull for tests)
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; |