diff options
-rw-r--r-- | TODO | 4 | ||||
-rw-r--r-- | lib/PublicInbox/DS.pm | 10 |
2 files changed, 9 insertions, 5 deletions
@@ -52,10 +52,6 @@ all need to be considered for everything we introduce) 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 7bd5d42b..ea09fc96 100644 --- a/lib/PublicInbox/DS.pm +++ b/lib/PublicInbox/DS.pm @@ -428,7 +428,15 @@ sub KQueueEventLoop { 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; |