about summary refs log tree commit homepage
path: root/lib/PublicInbox
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-07-05 13:05:41 +0000
committerEric Wong <e@80x24.org>2016-07-06 07:12:45 +0000
commit2fb6b0150b8a8fc49385d21d7fd1f8a1deff5ebf (patch)
treef5f5522af1930164c7c4c7389cd81dd1a4185955 /lib/PublicInbox
parente8b1d667bb008269dc48e4c473230379efefa06c (diff)
downloadpublic-inbox-2fb6b0150b8a8fc49385d21d7fd1f8a1deff5ebf.tar.gz
If using a master/worker setup, a careless user could be trying
to signal all processes using "killall".  This may trigger bad
side-effects; but try to limit the side-effects as much as
possible.
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r--lib/PublicInbox/Daemon.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/Daemon.pm b/lib/PublicInbox/Daemon.pm
index 512bb208..7849f9c0 100644
--- a/lib/PublicInbox/Daemon.pm
+++ b/lib/PublicInbox/Daemon.pm
@@ -449,7 +449,8 @@ sub daemon_loop ($$) {
         $SIG{QUIT} = $SIG{INT} = $SIG{TERM} = *worker_quit;
         $SIG{USR1} = *reopen_logs;
         $SIG{HUP} = $refresh;
-        $SIG{$_} = 'DEFAULT' for qw(CHLD USR2 TTIN TTOU WINCH);
+        $SIG{CHLD} = 'DEFAULT';
+        $SIG{$_} = 'IGNORE' for qw(USR2 TTIN TTOU WINCH);
         # this calls epoll_create:
         @listeners = map {
                 PublicInbox::Listener->new($_, $post_accept)