From ee8cadb3a71ab4c951642a96ba123688244de720 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 14 Sep 2020 03:42:30 +0000 Subject: sigfd: fix typos and scoping on systems w/o epoll+kqueue Unfortunately, I'm not sure how easy catching these at compile-time, is. Prototypes do not seem to check these at compile time when crossing packages (not even with exported subroutines). --- lib/PublicInbox/Daemon.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/PublicInbox/Daemon.pm') diff --git a/lib/PublicInbox/Daemon.pm b/lib/PublicInbox/Daemon.pm index e5798a4b..b929ec2a 100644 --- a/lib/PublicInbox/Daemon.pm +++ b/lib/PublicInbox/Daemon.pm @@ -75,7 +75,7 @@ sub accept_tls_opt ($) { sub daemon_prepare ($) { my ($default_listen) = @_; my $listener_names = {}; # sockname => IO::Handle - my $oldset = PublicInbox::Sigfd::block_signals(); + $oldset = PublicInbox::Sigfd::block_signals(); @CMD = ($0, @ARGV); my ($prog) = ($CMD[0] =~ m!([^/]+)\z!g); my $help = <new($sig, 0); local %SIG = (%SIG, %$sig) if !$sigfd; - PublicInbox::restore_signals($oldset) if !$sigfd; + PublicInbox::Sigfd::sig_setmask($oldset) if !$sigfd; while (1) { # main loop my $n = scalar keys %pids; unless (@listeners) { @@ -552,7 +552,7 @@ EOF $pids{$pid} = $i; } } - PubliInbox::Sigfd::set_sigmask($oldset) if !$sigfd; + PublicInbox::Sigfd::sig_setmask($oldset) if !$sigfd; } if ($sigfd) { # Linux and IO::KQueue users: @@ -640,7 +640,7 @@ sub daemon_loop ($$$$) { if (!$sigfd) { # wake up every second to accept signals if we don't # have signalfd or IO::KQueue: - PublicInbox::Sigfd::set_sigmask($oldset); + PublicInbox::Sigfd::sig_setmask($oldset); PublicInbox::DS->SetLoopTimeout(1000); } PublicInbox::DS->EventLoop; -- cgit v1.2.3-24-ge0c7