diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-15 08:21:59 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-15 08:21:59 (GMT) |
commit | 2ec6b176bd0fc41c6d00f244a4d8d6bdefa2c620 (patch) | |
tree | f93a8a228061d12b843d07e0954cd489b2623f5d | |
parent | 0b2489e986dd8fa3c58c242dd30559fce5135aaa (diff) | |
download | cpython-2ec6b176bd0fc41c6d00f244a4d8d6bdefa2c620.zip cpython-2ec6b176bd0fc41c6d00f244a4d8d6bdefa2c620.tar.gz cpython-2ec6b176bd0fc41c6d00f244a4d8d6bdefa2c620.tar.bz2 |
Issue #12060: Use sig_atomic_t type and volatile keyword in the signal module.
Patch written by Charles-François Natali.
-rw-r--r-- | Misc/NEWS | 3 | ||||
-rw-r--r-- | Modules/signalmodule.c | 6 |
2 files changed, 6 insertions, 3 deletions
@@ -10,6 +10,9 @@ What's New in Python 3.1.4? Core and Builtins ----------------- +- Issue #12060: Use sig_atomic_t type and volatile keyword in the signal + module. Patch written by Charles-François Natali. + - Issue #1195: Fix input() if it is interrupted by CTRL+d and then CTRL+c, clear the end-of-file indicator after CTRL+d. diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c index 1429770..5a6c777 100644 --- a/Modules/signalmodule.c +++ b/Modules/signalmodule.c @@ -78,12 +78,12 @@ static long main_thread; static pid_t main_pid; #endif -static struct { - int tripped; +static volatile struct { + sig_atomic_t tripped; PyObject *func; } Handlers[NSIG]; -static sig_atomic_t wakeup_fd = -1; +static volatile sig_atomic_t wakeup_fd = -1; /* Speed up sigcheck() when none tripped */ static volatile sig_atomic_t is_tripped = 0; |