diff options
author | Eric Wong <e@80x24.org> | 2021-10-14 13:16:07 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-10-15 02:23:26 +0000 |
commit | 4b5a1b5787edee2a3b6cc10a3ccc5721f1414268 (patch) | |
tree | 5439effe167100e8c2865a92ddc4df4b2bf6c0df /lib/PublicInbox/LEI.pm | |
parent | f64fdbc7cc19a34f471abaeada9195597bf7a282 (diff) | |
download | public-inbox-4b5a1b5787edee2a3b6cc10a3ccc5721f1414268.tar.gz |
By relying more on pgroups for remaining remaining processes, this lets us pause all curl+tail subprocesses with a single kill(2) to avoid cluttering stderr. We won't bother pausing the pigz/gzip/bzip2/xz compressor process not cat-file processes, though, since those don't write to the terminal and they idle soon after the workers react to SIGSTOP. AutoReap is hoisted out from TestCommon.pm. CLONE_SKIP is gone since we won't be using Perl threads any time soon (they're discouraged by the maintainers of Perl).
Diffstat (limited to 'lib/PublicInbox/LEI.pm')
-rw-r--r-- | lib/PublicInbox/LEI.pm | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index 9620e264..d0905562 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -516,12 +516,6 @@ sub sigpipe_handler { # handles SIGPIPE from @WQ_KEYS workers fail_handler($_[0], 13, delete $_[0]->{1}); } -# PublicInbox::OnDestroy callback for SIGINT to take out the entire pgid -sub sigint_reap { - my ($pgid) = @_; - dwaitpid($pgid) if kill('-INT', $pgid); -} - sub fail ($$;$) { my ($self, $buf, $exit_code) = @_; local $current_lei = $self; @@ -600,6 +594,7 @@ sub _lei_atfork_child { $cb->(@_) unless PublicInbox::Eml::warn_ignore(@_) }; } + $SIG{TERM} = sub { exit(128 + 15) }; $current_lei = $persist ? undef : $self; # for SIG{__WARN__} } |