Run safe signal handlers before returning from sigsuspend
This commit is contained in:
parent
39fd376542
commit
c52b77d65b
|
@ -0,0 +1,43 @@
|
||||||
|
From 38d7c791f597c3d567a70466dc2e48b73ec318bf Mon Sep 17 00:00:00 2001
|
||||||
|
From: Leon Timmermans <fawaka@gmail.com>
|
||||||
|
Date: Mon, 26 Dec 2011 19:06:54 +0200
|
||||||
|
Subject: [PATCH] Signal handlers must run before sigsuspend returns
|
||||||
|
|
||||||
|
The whole point of sigsuspend and pause is to wait until a signal has
|
||||||
|
arrived, and then return *after* it has been triggered. Currently
|
||||||
|
delayed/"safe" signals prevent that from happening, which might cause
|
||||||
|
race conditions.
|
||||||
|
|
||||||
|
This patch prevents that (as far as possible) by running the signal
|
||||||
|
handlers ASAP.
|
||||||
|
|
||||||
|
Petr Pisar: Back-ported to 5.14.2.
|
||||||
|
---
|
||||||
|
ext/POSIX/POSIX.xs | 4 ++++
|
||||||
|
1 files changed, 4 insertions(+), 0 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
|
||||||
|
index 8dc1f5a..4b9779b 100644
|
||||||
|
--- a/ext/POSIX/POSIX.xs
|
||||||
|
+++ b/ext/POSIX/POSIX.xs
|
||||||
|
@@ -1550,6 +1550,8 @@ sigaction(sig, optaction, oldaction = 0)
|
||||||
|
SysRet
|
||||||
|
sigpending(sigset)
|
||||||
|
POSIX::SigSet sigset
|
||||||
|
+ CLEANUP:
|
||||||
|
+ PERL_ASYNC_CHECK();
|
||||||
|
|
||||||
|
SysRet
|
||||||
|
sigprocmask(how, sigset, oldsigset = 0)
|
||||||
|
@@ -2019,6 +2021,8 @@ pathconf(filename, name)
|
||||||
|
|
||||||
|
SysRet
|
||||||
|
pause()
|
||||||
|
+ CLEANUP:
|
||||||
|
+ PERL_ASYNC_CHECK();
|
||||||
|
|
||||||
|
SysRet
|
||||||
|
setgid(gid)
|
||||||
|
--
|
||||||
|
1.7.7.6
|
||||||
|
|
|
@ -88,6 +88,10 @@ Patch12: perl-5.14.2-add-a-couple-missing-LEAVEs-in-perlio_async_run.patc
|
||||||
# fixed in Unicode-Collate-0.87.
|
# fixed in Unicode-Collate-0.87.
|
||||||
Patch13: perl-5.14.2-locale-search-inc.patch
|
Patch13: perl-5.14.2-locale-search-inc.patch
|
||||||
|
|
||||||
|
# Run safe signal handlers before returning from sigsuspend() and pause(),
|
||||||
|
# rhbz#771228, RT#107216, fixed after 5.15.6.
|
||||||
|
Patch14: perl-5.14.2-Signal-handlers-must-run-before-sigsuspend-returns.patch
|
||||||
|
|
||||||
# Update some of the bundled modules
|
# Update some of the bundled modules
|
||||||
# see http://fedoraproject.org/wiki/Perl/perl.spec for instructions
|
# see http://fedoraproject.org/wiki/Perl/perl.spec for instructions
|
||||||
|
|
||||||
|
@ -1253,6 +1257,7 @@ tarball from perl.org.
|
||||||
%patch11 -p1
|
%patch11 -p1
|
||||||
%patch12 -p1
|
%patch12 -p1
|
||||||
%patch13 -p1
|
%patch13 -p1
|
||||||
|
%patch14 -p1
|
||||||
|
|
||||||
#copy the example script
|
#copy the example script
|
||||||
cp -a %{SOURCE5} .
|
cp -a %{SOURCE5} .
|
||||||
|
@ -1456,6 +1461,7 @@ pushd %{build_archlib}/CORE/
|
||||||
'Fedora Patch11: Fix leak with non-matching named captures' \
|
'Fedora Patch11: Fix leak with non-matching named captures' \
|
||||||
'Fedora Patch12: Fix interrupted reading' \
|
'Fedora Patch12: Fix interrupted reading' \
|
||||||
'Fedora Patch13: Fix searching for Unicode::Collate::Locale data' \
|
'Fedora Patch13: Fix searching for Unicode::Collate::Locale data' \
|
||||||
|
'Fedora Patch14: Run signal handlers before returning from sigsuspend' \
|
||||||
%{nil}
|
%{nil}
|
||||||
|
|
||||||
rm patchlevel.bak
|
rm patchlevel.bak
|
||||||
|
@ -2415,6 +2421,8 @@ sed \
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Feb 06 2012 Petr Pisar <ppisar@redhat.com> - 4:5.14.2-211
|
* Mon Feb 06 2012 Petr Pisar <ppisar@redhat.com> - 4:5.14.2-211
|
||||||
- Fix searching for Unicode::Collate::Locale data (bug #756118)
|
- Fix searching for Unicode::Collate::Locale data (bug #756118)
|
||||||
|
- Run safe signal handlers before returning from sigsuspend() and pause()
|
||||||
|
(bug #771228)
|
||||||
|
|
||||||
* Tue Jan 10 2012 Paul Howarth <paul@city-fan.org> - 4:5.14.2-210
|
* Tue Jan 10 2012 Paul Howarth <paul@city-fan.org> - 4:5.14.2-210
|
||||||
- Rebuild again now that perl dependency generator is fixed (#772632, #772699)
|
- Rebuild again now that perl dependency generator is fixed (#772632, #772699)
|
||||||
|
|
Loading…
Reference in New Issue