From d1cc3ce8c056001eda5677c90be2900e14c1ed52 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 7 Sep 2025 23:41:43 +0000 Subject: [PATCH] ipc: avoid context line in generated exception 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/IPC.pm b/lib/PublicInbox/IPC.pm index a013031d2..257c78677 100644 --- a/lib/PublicInbox/IPC.pm +++ b/lib/PublicInbox/IPC.pm @@ -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 $@; } -- 2.47.3