From 52c0caa55855f21cf6e68ec323910447ba6d9a44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 27 Mar 2020 15:13:06 +0100 Subject: [PATCH] Close :unix PerlIO layers properly --- ...ix-close-method-call-underlaying-lay.patch | 29 +++++++++++++++++++ perl.spec | 6 ++++ 2 files changed, 35 insertions(+) create mode 100644 perl-5.31.8-perlio.c-make-unix-close-method-call-underlaying-lay.patch diff --git a/perl-5.31.8-perlio.c-make-unix-close-method-call-underlaying-lay.patch b/perl-5.31.8-perlio.c-make-unix-close-method-call-underlaying-lay.patch new file mode 100644 index 0000000..77097a8 --- /dev/null +++ b/perl-5.31.8-perlio.c-make-unix-close-method-call-underlaying-lay.patch @@ -0,0 +1,29 @@ +From d55a14617a40beb0dfda90ca2decc55918c0810c Mon Sep 17 00:00:00 2001 +From: Leon Timmermans +Date: Sat, 25 Jan 2020 00:51:44 +0100 +Subject: [PATCH] perlio.c: make :unix close method call underlaying layers as + well +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Písař +--- + perlio.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/perlio.c b/perlio.c +index e6e4312949..39481eeb10 100644 +--- a/perlio.c ++++ b/perlio.c +@@ -2818,6 +2818,7 @@ PerlIOUnix_close(pTHX_ PerlIO *f) + const int fd = PerlIOSelf(f, PerlIOUnix)->fd; + int code = 0; + if (PerlIOBase(f)->flags & PERLIO_F_OPEN) { ++ code = PerlIOBase_close(aTHX_ f); + if (PerlIOUnix_refcnt_dec(fd) > 0) { + PerlIOBase(f)->flags &= ~PERLIO_F_OPEN; + return 0; +-- +2.21.1 + diff --git a/perl.spec b/perl.spec index 1458280..6fd41c8 100644 --- a/perl.spec +++ b/perl.spec @@ -311,6 +311,9 @@ Patch75: perl-5.31.7-Add-tests-for-IO-Handle-getline-and-getlines.patch Patch76: perl-5.30.2-Loading-IO-is-now-threadsafe-avoiding-the-core-bug-r.patch Patch77: perl-5.31.7-Skip-the-new-open-pragma-tests-for-no-utf8-under-PER.patch +# Close :unix PerlIO layers properly, in upstream after 5.31.8 +Patch78: perl-5.31.8-perlio.c-make-unix-close-method-call-underlaying-lay.patch + # Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048 Patch200: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch @@ -4374,6 +4377,7 @@ you're not running VMS, this module does nothing. %patch75 -p1 %patch76 -p1 %patch77 -p1 +%patch78 -p1 %patch200 -p1 %patch201 -p1 @@ -4444,6 +4448,7 @@ perl -x patchlevel.h \ 'Fedora Patch75: Fix thread-safety of IO::Handle (GH#14816)' \ 'Fedora Patch76: Fix thread-safety of IO::Handle (GH#14816)' \ 'Fedora Patch77: Fix thread-safety of IO::Handle (GH#14816)' \ + 'Fedora Patch78: Close :unix PerlIO layers properly' \ 'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \ 'Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux' \ %{nil} @@ -7207,6 +7212,7 @@ popd - Fix POSIX:setlocale() documentation - Prevent from an integer overflow in POSIX::SigSet() - Fix thread-safety of IO::Handle (GH#14816) +- Close :unix PerlIO layers properly * Mon Mar 16 2020 Jitka Plesnikova - 4:5.30.2-452 - 5.30.2 bump (see