From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D5C6A138336 for ; Sat, 20 Jul 2019 19:39:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A1D21E07B3; Sat, 20 Jul 2019 19:39:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 73570E07A5 for ; Sat, 20 Jul 2019 19:39:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 580CF34822F for ; Sat, 20 Jul 2019 19:39:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7460A70D for ; Sat, 20 Jul 2019 19:39:10 +0000 (UTC) From: "Aaron Bauman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Aaron Bauman" Message-ID: <1563651483.cfec1a98eb1fa59061d5e780a799f02f021c6548.bman@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/perl/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/perl/files/perl-5.28.0-dirhandle.patch X-VCS-Directories: dev-lang/perl/files/ X-VCS-Committer: bman X-VCS-Committer-Name: Aaron Bauman X-VCS-Revision: cfec1a98eb1fa59061d5e780a799f02f021c6548 X-VCS-Branch: master Date: Sat, 20 Jul 2019 19:39:10 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 24d1ea65-2497-4887-9a3d-8db234389952 X-Archives-Hash: 02528f2188a355b601ce169867b8c5de commit: cfec1a98eb1fa59061d5e780a799f02f021c6548 Author: Michael Mair-Keimberger gmail com> AuthorDate: Sat Jun 22 15:58:46 2019 +0000 Commit: Aaron Bauman gentoo org> CommitDate: Sat Jul 20 19:38:03 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cfec1a98 dev-lang/perl: remove unused patch Signed-off-by: Michael Mair-Keimberger gmail.com> Closes: https://github.com/gentoo/gentoo/pull/12306 Signed-off-by: Aaron Bauman gentoo.org> dev-lang/perl/files/perl-5.28.0-dirhandle.patch | 99 ------------------------- 1 file changed, 99 deletions(-) diff --git a/dev-lang/perl/files/perl-5.28.0-dirhandle.patch b/dev-lang/perl/files/perl-5.28.0-dirhandle.patch deleted file mode 100644 index 02debe5ac2b..00000000000 --- a/dev-lang/perl/files/perl-5.28.0-dirhandle.patch +++ /dev/null @@ -1,99 +0,0 @@ -From e0eae03760cafde89463c4d3d238be9a629f7fca Mon Sep 17 00:00:00 2001 -From: Tony Cook -Date: Mon, 2 Jul 2018 10:43:19 +1000 -Subject: [PATCH] (perl #133314) always close the directory handle on clean up - -Previously the directory handle was only closed if the rest of the -magic free clean up is done, but in most success cases that code -doesn't run, leaking the directory handle. - -So always close the directory if our AV is available. - -(cherry picked from commit 3d5e9c119db6b727684fe75dfcfe5831c4351bec) ---- - doio.c | 56 +++++++++++++++++++++++++++++++------------------------- - 1 file changed, 31 insertions(+), 25 deletions(-) - -diff --git a/doio.c b/doio.c -index 4b8923f77c..16daf9fd11 100644 ---- a/doio.c -+++ b/doio.c -@@ -1163,44 +1163,50 @@ S_argvout_free(pTHX_ SV *io, MAGIC *mg) { - - /* mg_obj can be NULL if a thread is created with the handle open, in which - case we leave any clean up to the parent thread */ -- if (mg->mg_obj && IoIFP(io)) { -- SV **pid_psv; -+ if (mg->mg_obj) { - #ifdef ARGV_USE_ATFUNCTIONS - SV **dir_psv; - DIR *dir; -+ -+ dir_psv = av_fetch((AV*)mg->mg_obj, ARGVMG_ORIG_DIRP, FALSE); -+ assert(dir_psv && *dir_psv && SvIOK(*dir_psv)); -+ dir = INT2PTR(DIR *, SvIV(*dir_psv)); - #endif -- PerlIO *iop = IoIFP(io); -+ if (IoIFP(io)) { -+ SV **pid_psv; -+ PerlIO *iop = IoIFP(io); - -- assert(SvTYPE(mg->mg_obj) == SVt_PVAV); -+ assert(SvTYPE(mg->mg_obj) == SVt_PVAV); - -- pid_psv = av_fetch((AV*)mg->mg_obj, ARGVMG_ORIG_PID, FALSE); -+ pid_psv = av_fetch((AV*)mg->mg_obj, ARGVMG_ORIG_PID, FALSE); - -- assert(pid_psv && *pid_psv); -+ assert(pid_psv && *pid_psv); - -- if (SvIV(*pid_psv) == (IV)PerlProc_getpid()) { -- /* if we get here the file hasn't been closed explicitly by the -- user and hadn't been closed implicitly by nextargv(), so -- abandon the edit */ -- SV **temp_psv = av_fetch((AV*)mg->mg_obj, ARGVMG_TEMP_NAME, FALSE); -- const char *temp_pv = SvPVX(*temp_psv); -+ if (SvIV(*pid_psv) == (IV)PerlProc_getpid()) { -+ /* if we get here the file hasn't been closed explicitly by the -+ user and hadn't been closed implicitly by nextargv(), so -+ abandon the edit */ -+ SV **temp_psv = av_fetch((AV*)mg->mg_obj, ARGVMG_TEMP_NAME, FALSE); -+ const char *temp_pv = SvPVX(*temp_psv); - -- assert(temp_psv && *temp_psv && SvPOK(*temp_psv)); -- (void)PerlIO_close(iop); -- IoIFP(io) = IoOFP(io) = NULL; -+ assert(temp_psv && *temp_psv && SvPOK(*temp_psv)); -+ (void)PerlIO_close(iop); -+ IoIFP(io) = IoOFP(io) = NULL; - #ifdef ARGV_USE_ATFUNCTIONS -- dir_psv = av_fetch((AV*)mg->mg_obj, ARGVMG_ORIG_DIRP, FALSE); -- assert(dir_psv && *dir_psv && SvIOK(*dir_psv)); -- dir = INT2PTR(DIR *, SvIV(*dir_psv)); -- if (dir) { -- if (unlinkat(my_dirfd(dir), temp_pv, 0) < 0 && -- NotSupported(errno)) -- (void)UNLINK(temp_pv); -- closedir(dir); -- } -+ if (dir) { -+ if (unlinkat(my_dirfd(dir), temp_pv, 0) < 0 && -+ NotSupported(errno)) -+ (void)UNLINK(temp_pv); -+ } - #else -- (void)UNLINK(temp_pv); -+ (void)UNLINK(temp_pv); - #endif -+ } - } -+#ifdef ARGV_USE_ATFUNCTIONS -+ if (dir) -+ closedir(dir); -+#endif - } - - return 0; --- -2.21.0 -