diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-15 08:27:09 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-15 08:27:09 (GMT) |
commit | 5ebfe6d9a96beaa190e803259ffd05abe8786e14 (patch) | |
tree | dcb51df432e41cef60336c72271412ac16e358ea | |
parent | 318e62153baf1162130fb85e06caf64bbd5a7916 (diff) | |
parent | 2ec6b176bd0fc41c6d00f244a4d8d6bdefa2c620 (diff) | |
download | cpython-5ebfe6d9a96beaa190e803259ffd05abe8786e14.zip cpython-5ebfe6d9a96beaa190e803259ffd05abe8786e14.tar.gz cpython-5ebfe6d9a96beaa190e803259ffd05abe8786e14.tar.bz2 |
(Merge 3.1) 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.2.1 beta 1? 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 #12044: Fixed subprocess.Popen when used as a context manager to wait for the process to end when exiting the context to avoid unintentionally leaving zombie processes around. diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c index 00a83b4..87c1c9a 100644 --- a/Modules/signalmodule.c +++ b/Modules/signalmodule.c @@ -80,12 +80,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; |