]> Sergey Matveev's repositories - public-inbox.git/commitdiff
ipc: do not die inside wq_worker child process
authorEric Wong <e@80x24.org>
Sun, 7 Feb 2021 08:51:47 +0000 (08:51 +0000)
committerEric Wong <e@80x24.org>
Sun, 7 Feb 2021 22:56:57 +0000 (22:56 +0000)
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

index b936c27a62caf914a6100b2853999c0fec890a41..8f6f4ded72e1f25aaa4a66a7d79e2230dd31bc92 100644 (file)
@@ -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;