From cd50d183273c105a7f08b1875ba6f7a51d9f8e9a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 3 May 2019 10:34:08 +0000 Subject: bundle Danga::Socket and Sys::Syscall These modules are unmaintained upstream at the moment, but I'll be able to help with the intended maintainer once/if CPAN ownership is transferred. OTOH, we've been waiting for that transfer for several years, now... Changes I intend to make: * EPOLLEXCLUSIVE for Linux * remove unused fields wasting memory * kqueue bugfixes e.g. https://rt.cpan.org/Ticket/Display.html?id=116615 * accept4 support And some lower priority experiments: * switch to EV_ONESHOT / EPOLLONESHOT (incompatible changes) * nginx-style buffering to tmpfile instead of string array * sendfile off tmpfile buffers * io_uring maybe? --- lib/PublicInbox/Daemon.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/PublicInbox/Daemon.pm') diff --git a/lib/PublicInbox/Daemon.pm b/lib/PublicInbox/Daemon.pm index 48051f48..68ba9876 100644 --- a/lib/PublicInbox/Daemon.pm +++ b/lib/PublicInbox/Daemon.pm @@ -12,7 +12,7 @@ use Cwd qw/abs_path/; use Time::HiRes qw(clock_gettime CLOCK_MONOTONIC); STDOUT->autoflush(1); STDERR->autoflush(1); -require Danga::Socket; +require PublicInbox::DS; require POSIX; require PublicInbox::Listener; require PublicInbox::ParentPipe; @@ -172,14 +172,14 @@ sub worker_quit { # killing again terminates immediately: exit unless @listeners; - $_->close foreach @listeners; # call Danga::Socket::close + $_->close foreach @listeners; # call PublicInbox::DS::close @listeners = (); $reason->close if ref($reason) eq 'PublicInbox::ParentPipe'; my $proc_name; my $warn = 0; # drop idle connections and try to quit gracefully - Danga::Socket->SetPostLoopCallback(sub { + PublicInbox::DS->SetPostLoopCallback(sub { my ($dmap, undef) = @_; my $n = 0; my $now = clock_gettime(CLOCK_MONOTONIC); @@ -486,7 +486,7 @@ sub daemon_loop ($$) { PublicInbox::Listener->new($_, $post_accept) } @listeners; PublicInbox::EvCleanup::enable(); - Danga::Socket->EventLoop; + PublicInbox::DS->EventLoop; $parent_pipe = undef; } -- cgit v1.2.3-24-ge0c7