Gentoo Archives: gentoo-commits

From: Aaron Bauman <bman@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/perl/files/
Date: Sat, 20 Jul 2019 19:39:14
Message-Id: 1563651483.cfec1a98eb1fa59061d5e780a799f02f021c6548.bman@gentoo
1 commit: cfec1a98eb1fa59061d5e780a799f02f021c6548
2 Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Sat Jun 22 15:58:46 2019 +0000
4 Commit: Aaron Bauman <bman <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 20 19:38:03 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cfec1a98
7
8 dev-lang/perl: remove unused patch
9
10 Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
11 Closes: https://github.com/gentoo/gentoo/pull/12306
12 Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>
13
14 dev-lang/perl/files/perl-5.28.0-dirhandle.patch | 99 -------------------------
15 1 file changed, 99 deletions(-)
16
17 diff --git a/dev-lang/perl/files/perl-5.28.0-dirhandle.patch b/dev-lang/perl/files/perl-5.28.0-dirhandle.patch
18 deleted file mode 100644
19 index 02debe5ac2b..00000000000
20 --- a/dev-lang/perl/files/perl-5.28.0-dirhandle.patch
21 +++ /dev/null
22 @@ -1,99 +0,0 @@
23 -From e0eae03760cafde89463c4d3d238be9a629f7fca Mon Sep 17 00:00:00 2001
24 -From: Tony Cook <tony@××××××××××××.com>
25 -Date: Mon, 2 Jul 2018 10:43:19 +1000
26 -Subject: [PATCH] (perl #133314) always close the directory handle on clean up
27 -
28 -Previously the directory handle was only closed if the rest of the
29 -magic free clean up is done, but in most success cases that code
30 -doesn't run, leaking the directory handle.
31 -
32 -So always close the directory if our AV is available.
33 -
34 -(cherry picked from commit 3d5e9c119db6b727684fe75dfcfe5831c4351bec)
35 ----
36 - doio.c | 56 +++++++++++++++++++++++++++++++-------------------------
37 - 1 file changed, 31 insertions(+), 25 deletions(-)
38 -
39 -diff --git a/doio.c b/doio.c
40 -index 4b8923f77c..16daf9fd11 100644
41 ---- a/doio.c
42 -+++ b/doio.c
43 -@@ -1163,44 +1163,50 @@ S_argvout_free(pTHX_ SV *io, MAGIC *mg) {
44 -
45 - /* mg_obj can be NULL if a thread is created with the handle open, in which
46 - case we leave any clean up to the parent thread */
47 -- if (mg->mg_obj && IoIFP(io)) {
48 -- SV **pid_psv;
49 -+ if (mg->mg_obj) {
50 - #ifdef ARGV_USE_ATFUNCTIONS
51 - SV **dir_psv;
52 - DIR *dir;
53 -+
54 -+ dir_psv = av_fetch((AV*)mg->mg_obj, ARGVMG_ORIG_DIRP, FALSE);
55 -+ assert(dir_psv && *dir_psv && SvIOK(*dir_psv));
56 -+ dir = INT2PTR(DIR *, SvIV(*dir_psv));
57 - #endif
58 -- PerlIO *iop = IoIFP(io);
59 -+ if (IoIFP(io)) {
60 -+ SV **pid_psv;
61 -+ PerlIO *iop = IoIFP(io);
62 -
63 -- assert(SvTYPE(mg->mg_obj) == SVt_PVAV);
64 -+ assert(SvTYPE(mg->mg_obj) == SVt_PVAV);
65 -
66 -- pid_psv = av_fetch((AV*)mg->mg_obj, ARGVMG_ORIG_PID, FALSE);
67 -+ pid_psv = av_fetch((AV*)mg->mg_obj, ARGVMG_ORIG_PID, FALSE);
68 -
69 -- assert(pid_psv && *pid_psv);
70 -+ assert(pid_psv && *pid_psv);
71 -
72 -- if (SvIV(*pid_psv) == (IV)PerlProc_getpid()) {
73 -- /* if we get here the file hasn't been closed explicitly by the
74 -- user and hadn't been closed implicitly by nextargv(), so
75 -- abandon the edit */
76 -- SV **temp_psv = av_fetch((AV*)mg->mg_obj, ARGVMG_TEMP_NAME, FALSE);
77 -- const char *temp_pv = SvPVX(*temp_psv);
78 -+ if (SvIV(*pid_psv) == (IV)PerlProc_getpid()) {
79 -+ /* if we get here the file hasn't been closed explicitly by the
80 -+ user and hadn't been closed implicitly by nextargv(), so
81 -+ abandon the edit */
82 -+ SV **temp_psv = av_fetch((AV*)mg->mg_obj, ARGVMG_TEMP_NAME, FALSE);
83 -+ const char *temp_pv = SvPVX(*temp_psv);
84 -
85 -- assert(temp_psv && *temp_psv && SvPOK(*temp_psv));
86 -- (void)PerlIO_close(iop);
87 -- IoIFP(io) = IoOFP(io) = NULL;
88 -+ assert(temp_psv && *temp_psv && SvPOK(*temp_psv));
89 -+ (void)PerlIO_close(iop);
90 -+ IoIFP(io) = IoOFP(io) = NULL;
91 - #ifdef ARGV_USE_ATFUNCTIONS
92 -- dir_psv = av_fetch((AV*)mg->mg_obj, ARGVMG_ORIG_DIRP, FALSE);
93 -- assert(dir_psv && *dir_psv && SvIOK(*dir_psv));
94 -- dir = INT2PTR(DIR *, SvIV(*dir_psv));
95 -- if (dir) {
96 -- if (unlinkat(my_dirfd(dir), temp_pv, 0) < 0 &&
97 -- NotSupported(errno))
98 -- (void)UNLINK(temp_pv);
99 -- closedir(dir);
100 -- }
101 -+ if (dir) {
102 -+ if (unlinkat(my_dirfd(dir), temp_pv, 0) < 0 &&
103 -+ NotSupported(errno))
104 -+ (void)UNLINK(temp_pv);
105 -+ }
106 - #else
107 -- (void)UNLINK(temp_pv);
108 -+ (void)UNLINK(temp_pv);
109 - #endif
110 -+ }
111 - }
112 -+#ifdef ARGV_USE_ATFUNCTIONS
113 -+ if (dir)
114 -+ closedir(dir);
115 -+#endif
116 - }
117 -
118 - return 0;
119 ---
120 -2.21.0
121 -