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=-4.0 required=3.0 tests=ALL_TRUSTED,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 A18371F5AF for ; Mon, 29 Mar 2021 17:47:17 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] lei blob: cleanup solver tmpdir on failure Date: Mon, 29 Mar 2021 17:47:17 +0000 Message-Id: <20210329174717.21144-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: $lei->fail sends SIGTERM which prevents the File::Temp::Dir in $solver->{tmp} from being cleaned up, so use $lei->child_error instead. --- lib/PublicInbox/LeiBlob.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/LeiBlob.pm b/lib/PublicInbox/LeiBlob.pm index 91098a90..6195b368 100644 --- a/lib/PublicInbox/LeiBlob.pm +++ b/lib/PublicInbox/LeiBlob.pm @@ -39,7 +39,7 @@ sub solver_user_cb { # called by solver when done my $lei = $self->{lei}; my $log_buf = delete $lei->{'log_buf'}; $$log_buf =~ s/^/# /sgm; - ref($res) eq 'ARRAY' or return $lei->fail($$log_buf); + ref($res) eq 'ARRAY' or return $lei->child_error(1 << 8, $$log_buf); $lei->qerr($$log_buf); my ($git, $oid, $type, $size, $di) = @$res; my $gd = $git->{git_dir};