]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
ipc: avoid context line in generated exception
authorEric Wong <e@80x24.org>
Sun, 7 Sep 2025 23:41:43 +0000 (23:41 +0000)
committerEric Wong <e@80x24.org>
Wed, 10 Sep 2025 23:05:55 +0000 (23:05 +0000)
The filename and line number of the "aborted" message is
needless noise and confusing when dealing with errors
which already triggered ipc_fail.  So add a newline to
ensure Perl doesn't add context information if it needs
to `die' or `warn' on that message.

lib/PublicInbox/IPC.pm

index a013031d27acfce855586c70f7ab6c2060e89060..257c78677bc0ed48a4034914c51aae08573cb0ec 100644 (file)
@@ -208,7 +208,7 @@ sub ipc_worker_reap { # awaitpid callback
        my ($pid, $self, $inflight, $cb, @args) = @_;
        while (defined($inflight) && @$inflight) {
                my ($sub, $sub_arg, $acb, $acb_arg) = splice @$inflight, 0, 4;
-               my $exc = bless \(my $x = 'aborted'), 'PublicInbox::IPC::Die';
+               my $exc = bless \(my $x = "aborted\n"), 'PublicInbox::IPC::Die';
                eval { $acb->($self, $sub, $sub_arg, $acb_arg, $exc) };
                warn "E: (in abort): $sub: $@" if $@;
        }