]> Sergey Matveev's repositories - public-inbox.git/commitdiff
daemon: ignore SIGPIPE while running
authorEric Wong <e@yhbt.net>
Wed, 8 Jan 2020 10:44:08 +0000 (10:44 +0000)
committerEric Wong <e@80x24.org>
Wed, 8 Jan 2020 10:45:42 +0000 (10:45 +0000)
This is only needed for IO::Poll users, since users with
(signalfd || EVFILT_SIGNAL) support run with SIGPIPE (and
all other signals) blocked.

Fixes: 81a9a43fb858d197 ("daemon: use sigprocmask to block signals at startup")
lib/PublicInbox/Daemon.pm

index 292bc339a73c086f06c4a34bc47f63e3e962b4ed..278c80f56ca74d9603383b01f69f23c84100b471 100644 (file)
@@ -637,6 +637,7 @@ sub daemon_loop ($$$$) {
 
 sub run ($$$;$) {
        my ($default, $refresh, $post_accept, $nntpd) = @_;
+       local $SIG{PIPE} = 'IGNORE';
        daemon_prepare($default);
        my $af_default = $default =~ /:8080\z/ ? 'httpready' : undef;
        my $for_destroy = daemonize();