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
d8931c37
Commit
d8931c37
authored
May 04, 2013
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #14173: Avoid crashing when reading a signal handler during interpreter shutdown.
parent
a09657e9
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 @
d8931c37
...
...
@@ -34,6 +34,9 @@ Core and Builtins
Library
-------
-
Issue
#
14173
:
Avoid
crashing
when
reading
a
signal
handler
during
interpreter
shutdown
.
-
Issue
#
16316
:
mimetypes
now
recognizes
the
.
xz
and
.
txz
(.
tar
.
xz
)
extensions
.
-
Issue
#
17192
:
Restore
the
patch
for
Issue
#
10309
which
was
ommitted
...
...
Modules/signalmodule.c
View file @
d8931c37
...
...
@@ -321,7 +321,10 @@ signal_signal(PyObject *self, PyObject *args)
Handlers
[
sig_num
].
tripped
=
0
;
Py_INCREF
(
obj
);
Handlers
[
sig_num
].
func
=
obj
;
return
old_handler
;
if
(
old_handler
!=
NULL
)
return
old_handler
;
else
Py_RETURN_NONE
;
}
PyDoc_STRVAR
(
signal_doc
,
...
...
@@ -349,8 +352,13 @@ signal_getsignal(PyObject *self, PyObject *args)
return
NULL
;
}
old_handler
=
Handlers
[
sig_num
].
func
;
Py_INCREF
(
old_handler
);
return
old_handler
;
if
(
old_handler
!=
NULL
)
{
Py_INCREF
(
old_handler
);
return
old_handler
;
}
else
{
Py_RETURN_NONE
;
}
}
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