From: Eric Wong Date: Wed, 8 Jan 2020 10:44:08 +0000 (+0000) Subject: daemon: ignore SIGPIPE while running X-Git-Tag: v1.3.0~128 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;ds=sidebyside;h=57b19e788ed43d15487aac9927183b26a86c7d92;p=public-inbox.git daemon: ignore SIGPIPE while running 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") --- diff --git a/lib/PublicInbox/Daemon.pm b/lib/PublicInbox/Daemon.pm index 292bc339..278c80f5 100644 --- a/lib/PublicInbox/Daemon.pm +++ b/lib/PublicInbox/Daemon.pm @@ -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();