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 359D91FB05 for ; Thu, 21 Jan 2021 19:46:25 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 07/12] lei: oneshot: use client $io[2] for placeholder Date: Thu, 21 Jan 2021 19:46:19 +0000 Message-Id: <20210121194624.32002-8-e@80x24.org> In-Reply-To: <20210121194624.32002-1-e@80x24.org> References: <20210121194624.32002-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: STDERR may actually get closed in ->ipc_atfork_child in oneshot mode, so ensure we pass in a valid file handle to avoid warnings ->wq_do. --- lib/PublicInbox/LEI.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index 2cb2bf40..11ea385f 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -334,7 +334,7 @@ sub atfork_parent_wq { $self->{env} = $env; delete @$ret{qw(-lei_store cfg pgr lxs)}; # keep l2m my @io = delete @$ret{0..2}; - $io[3] = delete($ret->{sock}) // *STDERR{GLOB}; + $io[3] = delete($ret->{sock}) // $io[2]; my $l2m = $ret->{l2m}; if ($l2m && $l2m != $wq) { # $wq == lxs $io[4] = $l2m->{-wq_s1} if $l2m->{-wq_s1};