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-ASN: 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 0D43D1FA1A for ; Sun, 10 Oct 2021 14:25:20 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 7/8] lei/store: keep ".err-XXXX" in stderr tmpfile Date: Sun, 10 Oct 2021 14:25:17 +0000 Message-Id: <20211010142518.7012-8-e@80x24.org> In-Reply-To: <20211010142518.7012-1-e@80x24.org> References: <20211010142518.7012-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: This is slighly more meaningful since the file is already in ~/.local/share/lei/store, so "lei_store" was redundant (and the "XXXX" are random characters replaced by File::Temp) --- lib/PublicInbox/LeiStore.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/LeiStore.pm b/lib/PublicInbox/LeiStore.pm index 52a1456f..613d1d31 100644 --- a/lib/PublicInbox/LeiStore.pm +++ b/lib/PublicInbox/LeiStore.pm @@ -512,7 +512,7 @@ sub xchg_stderr { return unless -e $dir; my $old = delete $self->{-tmp_err}; my $pfx = POSIX::strftime('%Y%m%d%H%M%S', gmtime(time)); - my $err = File::Temp->new(TEMPLATE => "$pfx.$$.lei_storeXXXX", + my $err = File::Temp->new(TEMPLATE => "$pfx.$$.err-XXXX", SUFFIX => '.err', DIR => $dir); open STDERR, '>>', $err->filename or die "dup2: $!"; STDERR->autoflush(1); # shared with shard subprocesses