about summary refs log tree commit homepage
path: root/lib/PublicInbox/Sigfd.pm
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-08-07 10:15:04 +0000
committerEric Wong <e@yhbt.net>2020-08-07 23:44:55 +0000
commit62068fafcb40c2f91d31cf3fa5e775ecc52a6ba8 (patch)
tree64416de947b897e8ce15c4c91423bb8639e21669 /lib/PublicInbox/Sigfd.pm
parent9968a955fd7881155bd4938116b98d2ffba192e6 (diff)
downloadpublic-inbox-62068fafcb40c2f91d31cf3fa5e775ecc52a6ba8.tar.gz
Thanks to the GCC compile farm project, we can wire up syscalls
for sparc64 and set system-specific SFD_* constants properly.

I've FINALLY figured out how to use POSIX::SigSet to generate
a usable buffer for the syscall perlfunc.  This is required
for endian-neutral behavior and relevant to sparc64, at least.

There's no need for signalfd-related stuff to be constants,
either.  signalfd initialization is never a hot path and a stub
subroutine for constants uses several KB of memory in the
interpreter.

We'll drop the needless SEEK_CUR import while we're importing
O_NONBLOCK, too.
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 bf91bb37..5d61e630 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;