* [PATCH 5/4] DS: workaround IO::Kqueue EINTR (mis-)handling
@ 2019-05-05 4:56 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2019-05-05 4:56 UTC (permalink / raw)
To: meta
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
---
TODO | 4 ----
lib/PublicInbox/DS.pm | 10 +++++++++-
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/TODO b/TODO
index ac255b8..d947b0f 100644
--- a/TODO
+++ b/TODO
@@ -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 7bd5d42..ea09fc9 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;
--
^ permalink raw reply related [relevance 7%]
* [PATCH 0/4] Danga::Socket bundling cleanups
@ 2019-05-08 19:18 6% ` Eric Wong
1 sibling, 0 replies; 2+ results
From: Eric Wong @ 2019-05-08 19:18 UTC (permalink / raw)
To: meta
Dropping some unused stuff, and a bugfix for an error path we never hit.
(all bugfixes are queued for the future maintainer via
bug-Danga-Socket@rt.cpan.org )
Eric Wong (4):
build: do not manify DS and Syscall pods
syscall: drop readahead wrapper
DS: drop unused "_undef" sub
DS: epoll: fix misordered EPOLL_CTL_DEL call
Makefile.PL | 10 ++++++++++
lib/PublicInbox/DS.pm | 9 +--------
lib/PublicInbox/Syscall.pm | 14 --------------
3 files changed, 11 insertions(+), 22 deletions(-)
The "danga-bundle" is up to 10 patches, now; and dogfooded
on public-inbox.org for several days without problems.
Will merge to "master" soon:
bundle Danga::Socket and Sys::Syscall
listener: use EPOLLEXCLUSIVE for listen sockets
DS: remove unused fields and functions
DS: drop profiling support
DS: workaround IO::Kqueue EINTR (mis-)handling
DS: handle EINTR in IO::Poll path, too
build: do not manify DS and Syscall pods
syscall: drop readahead wrapper
DS: drop unused "_undef" sub
DS: epoll: fix misordered EPOLL_CTL_DEL call
^ permalink raw reply [relevance 6%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2019-05-05 0:52 [PATCH 0/4] bundle Danga::Socket and Sys::Syscall Eric Wong
2019-05-05 0:52 ` [PATCH 1/4] " Eric Wong
2019-05-05 4:56 7% ` [PATCH 5/4] DS: workaround IO::Kqueue EINTR (mis-)handling Eric Wong
2019-05-08 19:18 6% ` [PATCH 0/4] Danga::Socket bundling cleanups Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).