diff options
author | Eric Wong <e@80x24.org> | 2019-05-05 04:56:14 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-05-05 23:23:42 +0000 |
commit | e229e045a93ef35c335af00cd0e130a6ec6146d4 (patch) | |
tree | 663aef2ab7ddbbd507b8b1b750134954bdaa920d /lib/PublicInbox/DS.pm | |
parent | 0ec366eb837dc8ee3face1d2a5a40669d937054e (diff) | |
download | public-inbox-e229e045a93ef35c335af00cd0e130a6ec6146d4.tar.gz |
IO::Kqueue seems unmaintained, so workaround a long-standing bug where it falls over on signals: https://rt.cpan.org/Ticket/Display.html?id=116615
Diffstat (limited to 'lib/PublicInbox/DS.pm')
-rw-r--r-- | lib/PublicInbox/DS.pm | 10 |
1 files changed, 9 insertions, 1 deletions
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; |