diff options
author | Eric Wong <e@80x24.org> | 2023-10-04 03:49:23 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-10-04 17:46:39 +0000 |
commit | 3da3068fe2d1cdf8e2a1c5a1b341ba910a0e5810 (patch) | |
tree | e079def50a048ed79fa9ad285b8afe5783116438 /lib/PublicInbox/LEI.pm | |
parent | b3538311b66310cb160569e5bdbcb00e91f4b9aa (diff) | |
download | public-inbox-3da3068fe2d1cdf8e2a1c5a1b341ba910a0e5810.tar.gz |
Since we completely shut down all workers before exiting, we no longer have to care about missing SIGCHLD wakeups during shutdown.
Diffstat (limited to 'lib/PublicInbox/LEI.pm')
-rw-r--r-- | lib/PublicInbox/LEI.pm | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index c9ad46e2..d611f5c3 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -1365,9 +1365,6 @@ sub lazy_start { my $sig = { CHLD => \&PublicInbox::DS::enqueue_reap }; $sig->{$_} = $quit for qw(QUIT INT TERM); $sig->{$_} = \&PublicInbox::Config::noop for qw(HUP USR1 USR2); - # for EVFILT_SIGNAL and signalfd behavioral difference: - my @kq_ign = eval { require PublicInbox::DSKQXS } ? keys(%$sig) : (); - require PublicInbox::DirIdle; local $dir_idle = PublicInbox::DirIdle->new(sub { # just rely on wakeup to hit post_loop_do @@ -1390,16 +1387,6 @@ sub lazy_start { # $daemon pipe to `lei' closed, main loop begins: eval { PublicInbox::DS::event_loop($sig, $oldset) }; warn "event loop error: $@\n" if $@; - - # EVFILT_SIGNAL will get a duplicate of all the signals it was sent - local @SIG{@kq_ign} = map 'IGNORE', @kq_ign; - PublicInbox::DS::sig_setmask($oldset) if @kq_ign; - - # exit() may trigger waitpid via various DESTROY, ensure interruptible - local $SIG{TERM} = sub { exit(POSIX::SIGTERM + 128) }; - local $SIG{INT} = sub { exit(POSIX::SIGINT + 128) }; - local $SIG{QUIT} = sub { exit(POSIX::SIGQUIT + 128) }; - PublicInbox::DS::sig_setmask($oldset) if !@kq_ign; dump_and_clear_log(); exit($exit_code // 0); } |