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
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
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;