X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FDSKQXS.pm;h=eccfa56d72cb5fc8d2151a6f2f1f4b19e9251ce9;hb=23af251dd607c4e75ab1e68063f2c885c48cc035;hp=9a37e4ce5e780ce23578cfb61e1bbb94d650733a;hpb=52df89ced31a5685d37e17c62ccccd3db5aa3e62;p=public-inbox.git
diff --git a/lib/PublicInbox/DSKQXS.pm b/lib/PublicInbox/DSKQXS.pm
index 9a37e4ce..eccfa56d 100644
--- a/lib/PublicInbox/DSKQXS.pm
+++ b/lib/PublicInbox/DSKQXS.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2019-2020 all contributors
+# Copyright (C) 2019-2021 all contributors
# Licensed the same as Danga::Socket (and Perl5)
# License: GPL-1.0+ or Artistic-1.0-Perl
#
@@ -18,7 +18,7 @@ use Symbol qw(gensym);
use IO::KQueue;
use Errno qw(EAGAIN);
use PublicInbox::Syscall qw(EPOLLONESHOT EPOLLIN EPOLLOUT EPOLLET
- EPOLL_CTL_ADD EPOLL_CTL_MOD EPOLL_CTL_DEL SFD_NONBLOCK);
+ EPOLL_CTL_ADD EPOLL_CTL_MOD EPOLL_CTL_DEL);
our @EXPORT_OK = qw(epoll_ctl epoll_wait);
sub EV_DISPATCH () { 0x0080 }
@@ -48,16 +48,16 @@ sub new {
# It's wasteful in that it uses another FD, but it simplifies
# our epoll-oriented code.
sub signalfd {
- my ($class, $signo, $flags) = @_;
+ my ($class, $signo, $nonblock) = @_;
my $sym = gensym;
- tie *$sym, $class, $signo, $flags; # calls TIEHANDLE
+ tie *$sym, $class, $signo, $nonblock; # calls TIEHANDLE
$sym
}
sub TIEHANDLE { # similar to signalfd()
- my ($class, $signo, $flags) = @_;
+ my ($class, $signo, $nonblock) = @_;
my $self = $class->new;
- $self->{timeout} = ($flags & SFD_NONBLOCK) ? 0 : -1;
+ $self->{timeout} = $nonblock ? 0 : -1;
my $kq = $self->{kq};
$kq->EV_SET($_, EVFILT_SIGNAL, EV_ADD) for @$signo;
$self;