From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id ED6491F45F; Wed, 8 May 2019 09:07:36 +0000 (UTC) Date: Wed, 8 May 2019 09:07:36 +0000 From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 6/4] DS: handle EINTR in IO::Poll path, too Message-ID: <20190508090736.tpyagjbsfq2usd52@whir> References: <20190505005219.31772-1-e@80x24.org> <20190505005219.31772-2-e@80x24.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190505005219.31772-2-e@80x24.org> List-Id: IO::Poll::_poll returns -1, which is "true" to Perl. cf. https://rt.cpan.org/Ticket/Display.html?id=129484 --- Not sure if anybody is using platforms w/o epoll or kqueue; but I encountered this on FreeBSD since I forgot to install p5-IO-KQueue (IO::Kqueue). Maybe GNU/Hurd users can benefit :> lib/PublicInbox/DS.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/DS.pm b/lib/PublicInbox/DS.pm index ea09fc9..5dd1bb7 100644 --- a/lib/PublicInbox/DS.pm +++ b/lib/PublicInbox/DS.pm @@ -386,7 +386,7 @@ sub PollEventLoop { } my $count = IO::Poll::_poll($timeout, @poll); - unless ($count) { + unless ($count >= 0) { return unless PostEventLoop(); next; } -- EW