Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
f6f90ff0
Commit
f6f90ff0
authored
Nov 03, 2017
by
Antoine Pitrou
Committed by
GitHub
Nov 03, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-30057: Fix potential missed signal in signal.signal(). (#4258)
Bug report and patch by Jeroen Demeyer.
parent
a7723d8b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletion
+6
-1
Misc/ACKS
Misc/ACKS
+1
-0
Misc/NEWS.d/next/Library/2017-11-03-19-11-43.bpo-30057.NCaijI.rst
...S.d/next/Library/2017-11-03-19-11-43.bpo-30057.NCaijI.rst
+1
-0
Modules/signalmodule.c
Modules/signalmodule.c
+4
-1
No files found.
Misc/ACKS
View file @
f6f90ff0
...
...
@@ -362,6 +362,7 @@ Vincent Delft
Arnaud Delobelle
Konrad Delong
Erik Demaine
Jeroen Demeyer
Martin Dengler
John Dennis
L. Peter Deutsch
...
...
Misc/NEWS.d/next/Library/2017-11-03-19-11-43.bpo-30057.NCaijI.rst
0 → 100644
View file @
f6f90ff0
Fix potential missed signal in signal.signal().
Modules/signalmodule.c
View file @
f6f90ff0
...
...
@@ -461,12 +461,15 @@ signal_signal_impl(PyObject *module, int signalnum, PyObject *handler)
}
else
func
=
signal_handler
;
/* Check for pending signals before changing signal handler */
if
(
PyErr_CheckSignals
())
{
return
NULL
;
}
if
(
PyOS_setsig
(
signalnum
,
func
)
==
SIG_ERR
)
{
PyErr_SetFromErrno
(
PyExc_OSError
);
return
NULL
;
}
old_handler
=
Handlers
[
signalnum
].
func
;
_Py_atomic_store_relaxed
(
&
Handlers
[
signalnum
].
tripped
,
0
);
Py_INCREF
(
handler
);
Handlers
[
signalnum
].
func
=
handler
;
if
(
old_handler
!=
NULL
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment