about summary refs log tree commit homepage
path: root/lib/PublicInbox/Sigfd.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-12-31 13:51:50 +0000
committerEric Wong <e@80x24.org>2021-01-01 05:00:40 +0000
commit52df89ced31a5685d37e17c62ccccd3db5aa3e62 (patch)
tree3b36d49255b646c1a7c80159db279e20c51979b3 /lib/PublicInbox/Sigfd.pm
parentd59a9cb667f106b29363795539b55116077bcd80 (diff)
downloadpublic-inbox-52df89ced31a5685d37e17c62ccccd3db5aa3e62.tar.gz
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.
Diffstat (limited to 'lib/PublicInbox/Sigfd.pm')
-rw-r--r--lib/PublicInbox/Sigfd.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/Sigfd.pm b/lib/PublicInbox/Sigfd.pm
index 5d61e630..bf91bb37 100644
--- a/lib/PublicInbox/Sigfd.pm
+++ b/lib/PublicInbox/Sigfd.pm
@@ -6,7 +6,7 @@
 package PublicInbox::Sigfd;
 use strict;
 use parent qw(PublicInbox::DS);
-use PublicInbox::Syscall qw(signalfd EPOLLIN EPOLLET $SFD_NONBLOCK);
+use PublicInbox::Syscall qw(signalfd EPOLLIN EPOLLET SFD_NONBLOCK);
 use POSIX qw(:signal_h);
 use IO::Handle ();
 
@@ -33,7 +33,7 @@ sub new {
         } else {
                 return; # wake up every second to check for signals
         }
-        if ($flags & $SFD_NONBLOCK) { # it can go into the event loop
+        if ($flags & SFD_NONBLOCK) { # it can go into the event loop
                 $self->SUPER::new($io, EPOLLIN | EPOLLET);
         } else { # master main loop
                 $self->{sock} = $io;