TODO | 4 ---- lib/PublicInbox/DS.pm | 10 +++++++++- diff --git a/TODO b/TODO index ac255b861ca3e21d6598be1493845b79afbaf812..d947b0ff822198abccc4f1c558eedd42f64bbae5 100644 --- a/TODO +++ b/TODO @@ -52,10 +52,6 @@ and totally broken Message-IDs cf. https://public-inbox.org/git/20160814012706.GA18784@starla/ -* portability to FreeBSD (and other Free Software *BSDs) - ugh... https://rt.cpan.org/Ticket/Display.html?id=116615 - (IO::KQueue is broken with Danga::Socket / PublicInbox::DS) - * improve documentation * linkify thread skeletons better diff --git a/lib/PublicInbox/DS.pm b/lib/PublicInbox/DS.pm index 7bd5d42b9b2aaef8ab73acd356c4d66b6225d9ea..ea09fc96ed6cc9f38af0d629c2d358d0b3ef8ec1 100644 --- a/lib/PublicInbox/DS.pm +++ b/lib/PublicInbox/DS.pm @@ -428,7 +428,15 @@ } while (1) { my $timeout = RunTimers(); - my @ret = $KQueue->kevent($timeout); + my @ret = eval { $KQueue->kevent($timeout) }; + if (my $err = $@) { + # workaround https://rt.cpan.org/Ticket/Display.html?id=116615 + if ($err =~ /Interrupted system call/) { + @ret = (); + } else { + die $err; + } + } foreach my $kev (@ret) { my ($fd, $filter, $flags, $fflags) = @$kev;