about summary refs log tree commit homepage
path: root/lib/PublicInbox/DS.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/DS.pm')
-rw-r--r--lib/PublicInbox/DS.pm10
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;