* [PATCH] sigfd: fix typos and scoping on systems w/o epoll+kqueue
@ 2020-09-14 3:42 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2020-09-14 3:42 UTC (permalink / raw)
To: meta
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 ++++----
script/public-inbox-watch | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
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 = <<EOF;
@@ -523,7 +523,7 @@ EOF
};
my $sigfd = PublicInbox::Sigfd->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;
diff --git a/script/public-inbox-watch b/script/public-inbox-watch
index 1d164aa3..55183ef2 100755
--- a/script/public-inbox-watch
+++ b/script/public-inbox-watch
@@ -60,7 +60,7 @@ if ($watch) {
my $sigfd = PublicInbox::Sigfd->new($sig, $SFD_NONBLOCK);
local %SIG = (%SIG, %$sig) if !$sigfd;
if (!$sigfd) {
- PublicInbox::Sigfd::set_sigmask($oldset);
+ PublicInbox::Sigfd::sig_setmask($oldset);
PublicInbox::DS->SetLoopTimeout(1000);
}
$watch->watch($sig, $oldset) while ($watch);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-14 3:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-14 3:42 [PATCH] sigfd: fix typos and scoping on systems w/o epoll+kqueue Eric Wong
user/dev discussion of public-inbox itself
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://public-inbox.org/meta
git clone --mirror http://czquwvybam4bgbro.onion/meta
git clone --mirror http://hjrcffqmbrq6wope.onion/meta
git clone --mirror http://ou63pmih66umazou.onion/meta
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V1 meta meta/ http://public-inbox.org/meta \
meta@public-inbox.org
public-inbox-index meta
Example config snippet for mirrors.
Newsgroups are available over NNTP:
nntp://news.public-inbox.org/inbox.comp.mail.public-inbox.meta
nntp://ou63pmih66umazou.onion/inbox.comp.mail.public-inbox.meta
nntp://czquwvybam4bgbro.onion/inbox.comp.mail.public-inbox.meta
nntp://hjrcffqmbrq6wope.onion/inbox.comp.mail.public-inbox.meta
nntp://news.gmane.io/gmane.mail.public-inbox.general
note: .onion URLs require Tor: https://www.torproject.org/
code repositories for project(s) associated with this inbox:
https://80x24.org/public-inbox.git
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git