]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/DS.pm
qspawn: fix EINTR with generic PSGI servers
[public-inbox.git] / lib / PublicInbox / DS.pm
index 268406628788931b56d71f31e5a8203c2ce963db..e4629e97acc461aaa2debbe1687db8f0aecab796 100644 (file)
@@ -126,12 +126,11 @@ sub add_uniq_timer { # ($name, $secs, $coderef, @args) = @_;
 
 # caller sets return value to $Epoll
 sub _InitPoller () {
-       if (PublicInbox::Syscall::epoll_defined())  {
+       if (defined $PublicInbox::Syscall::SYS_epoll_create)  {
                my $fd = epoll_create();
                die "epoll_create: $!" if $fd < 0;
                open($ep_io, '+<&=', $fd) or return;
-               my $fl = fcntl($ep_io, F_GETFD, 0);
-               fcntl($ep_io, F_SETFD, $fl | FD_CLOEXEC);
+               fcntl($ep_io, F_SETFD, FD_CLOEXEC);
                $fd;
        } else {
                my $cls;