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
52c5f85c
Commit
52c5f85c
authored
May 04, 2013
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Plain Diff
Issue #14173: Avoid crashing when reading a signal handler during interpreter shutdown.
parents
df6931db
c8c952ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
Misc/NEWS
Misc/NEWS
+3
-0
Modules/signalmodule.c
Modules/signalmodule.c
+11
-3
No files found.
Misc/NEWS
View file @
52c5f85c
...
@@ -69,6 +69,9 @@ Core and Builtins
...
@@ -69,6 +69,9 @@ Core and Builtins
Library
Library
-------
-------
- Issue #14173: Avoid crashing when reading a signal handler during
interpreter shutdown.
- Issue #15902: Fix imp.load_module() accepting None as a file when loading an
- Issue #15902: Fix imp.load_module() accepting None as a file when loading an
extension module.
extension module.
...
...
Modules/signalmodule.c
View file @
52c5f85c
...
@@ -339,7 +339,10 @@ signal_signal(PyObject *self, PyObject *args)
...
@@ -339,7 +339,10 @@ signal_signal(PyObject *self, PyObject *args)
Handlers
[
sig_num
].
tripped
=
0
;
Handlers
[
sig_num
].
tripped
=
0
;
Py_INCREF
(
obj
);
Py_INCREF
(
obj
);
Handlers
[
sig_num
].
func
=
obj
;
Handlers
[
sig_num
].
func
=
obj
;
return
old_handler
;
if
(
old_handler
!=
NULL
)
return
old_handler
;
else
Py_RETURN_NONE
;
}
}
PyDoc_STRVAR
(
signal_doc
,
PyDoc_STRVAR
(
signal_doc
,
...
@@ -367,8 +370,13 @@ signal_getsignal(PyObject *self, PyObject *args)
...
@@ -367,8 +370,13 @@ signal_getsignal(PyObject *self, PyObject *args)
return
NULL
;
return
NULL
;
}
}
old_handler
=
Handlers
[
sig_num
].
func
;
old_handler
=
Handlers
[
sig_num
].
func
;
Py_INCREF
(
old_handler
);
if
(
old_handler
!=
NULL
)
{
return
old_handler
;
Py_INCREF
(
old_handler
);
return
old_handler
;
}
else
{
Py_RETURN_NONE
;
}
}
}
PyDoc_STRVAR
(
getsignal_doc
,
PyDoc_STRVAR
(
getsignal_doc
,
...
...
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