From 52df89ced31a5685d37e17c62ccccd3db5aa3e62 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 31 Dec 2020 13:51:50 +0000 Subject: syscall: SFD_NONBLOCK can be a constant, again Since Perl exposes O_NONBLOCK as a constant, we can safely make SFD_NONBLOCK a constant, too. This is not the case for SFD_CLOEXEC, since O_CLOEXEC is not exposed by Perl despite being used internally in the interpreter. --- script/public-inbox-watch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'script') diff --git a/script/public-inbox-watch b/script/public-inbox-watch index 55183ef2..4fd6ad49 100755 --- a/script/public-inbox-watch +++ b/script/public-inbox-watch @@ -14,7 +14,7 @@ use PublicInbox::Watch; use PublicInbox::Config; use PublicInbox::DS; use PublicInbox::Sigfd; -use PublicInbox::Syscall qw($SFD_NONBLOCK); +use PublicInbox::Syscall qw(SFD_NONBLOCK); my $do_scan = 1; GetOptions('scan!' => \$do_scan, # undocumented, testing only 'help|h' => \(my $show_help)) or do { print STDERR $help; exit 1 }; @@ -57,7 +57,7 @@ if ($watch) { # --no-scan is only intended for testing atm, undocumented. PublicInbox::DS::requeue($scan) if $do_scan; - my $sigfd = PublicInbox::Sigfd->new($sig, $SFD_NONBLOCK); + my $sigfd = PublicInbox::Sigfd->new($sig, SFD_NONBLOCK); local %SIG = (%SIG, %$sig) if !$sigfd; if (!$sigfd) { PublicInbox::Sigfd::sig_setmask($oldset); -- cgit v1.2.3-24-ge0c7