From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 599E41FA29 for ; Wed, 28 Dec 2022 10:05:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1672221935; bh=k1l+Pq15J+PIyJt+CeqmdvFsnIv+9FFs7rQh/2FKGcQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mZ7hbzDlSjswUC1+Sf1NoNz0RX8Rfq7iYI1KU0FujpZxLFkQ7oopS7e6VPPXcZ8oa u7DFkexEQGrWaxC/hDLzBu1ZZ+mPHAg0T1hb6Lp4HCa5QklR6J4oynBybfvmHCT+7W T0qqVP9kX51UUHN/oa/oZDHUc4SdDYQLoFJKOrsU= From: Eric Wong To: mwrap-perl@80x24.org Subject: [PATCH 2/4] rproxy: close pipes in deterministic order Date: Wed, 28 Dec 2022 10:05:33 +0000 Message-Id: <20221228100535.2252158-3-e@80x24.org> In-Reply-To: <20221228100535.2252158-1-e@80x24.org> References: <20221228100535.2252158-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: And always close our write end first so we can shut down addr2line slightly sooner. --- lib/Devel/Mwrap/Rproxy.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Devel/Mwrap/Rproxy.pm b/lib/Devel/Mwrap/Rproxy.pm index 29225c1..b10fa5b 100644 --- a/lib/Devel/Mwrap/Rproxy.pm +++ b/lib/Devel/Mwrap/Rproxy.pm @@ -159,7 +159,7 @@ sub lookup { sub DESTROY { my ($self) = @_; - delete @$self{qw(rd wr)}; + close($_) for (delete @$self{qw(wr rd)}); waitpid(delete $self->{pid}, 0); }