From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 02B171F8C9 for ; Sun, 7 Feb 2021 08:52:02 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 05/19] ipc: do not die inside wq_worker child process Date: Sun, 7 Feb 2021 08:51:47 +0000 Message-Id: <20210207085201.13871-6-e@80x24.org> In-Reply-To: <20210207085201.13871-1-e@80x24.org> References: <20210207085201.13871-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: die() in a child zips up the stack into the parent, which is undesirable behavior. We're going to exit anyways, just warn and let exit(1) happen due to $@ being set. --- lib/PublicInbox/IPC.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/IPC.pm b/lib/PublicInbox/IPC.pm index b936c27a..8f6f4ded 100644 --- a/lib/PublicInbox/IPC.pm +++ b/lib/PublicInbox/IPC.pm @@ -129,7 +129,7 @@ sub ipc_worker_spawn { local %SIG = %SIG; ipc_worker_loop($self, $r_req, $w_res); }; - die "worker $ident PID:$$ died: $@\n" if $@; + warn "worker $ident PID:$$ died: $@\n" if $@; undef $end; # trigger exit } PublicInbox::DS::sig_setmask($sigset) unless $oldset;