]> Sergey Matveev's repositories - public-inbox.git/commitdiff
daemon: reset unused signal handlers to default in child
authorEric Wong <e@80x24.org>
Sat, 11 Jun 2016 21:56:31 +0000 (21:56 +0000)
committerEric Wong <e@80x24.org>
Sat, 11 Jun 2016 21:57:53 +0000 (21:57 +0000)
They're effectively noops anyways, and we don't want to be
holding a reference to the read end of the parent pipe.

lib/PublicInbox/Daemon.pm

index b64ec87412dc07703d2a171c34ce59fb3511a2e3..b76b9ffbf91ac944518aa72d43ed43bcde618174 100644 (file)
@@ -448,6 +448,7 @@ 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);
        # this calls epoll_create:
        @listeners = map {
                PublicInbox::Listener->new($_, $post_accept)