(original) (raw)
changeset: 70137:945ca78c38b1 branch: 3.1 parent: 70132:0311f62714f7 user: Victor Stinner victor.stinner@haypocalc.com date: Sun May 15 10:21:59 2011 +0200 files: Misc/NEWS Modules/signalmodule.c description: Issue #12060: Use sig_atomic_t type and volatile keyword in the signal module. Patch written by Charles-François Natali. diff -r 0311f62714f7 -r 945ca78c38b1 Misc/NEWS --- a/Misc/NEWS Sun May 15 08:49:12 2011 +0200 +++ b/Misc/NEWS Sun May 15 10:21:59 2011 +0200 @@ -10,6 +10,9 @@ 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 -r 0311f62714f7 -r 945ca78c38b1 Modules/signalmodule.c --- a/Modules/signalmodule.c Sun May 15 08:49:12 2011 +0200 +++ b/Modules/signalmodule.c Sun May 15 10:21:59 2011 +0200 @@ -78,12 +78,12 @@ 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; /victor.stinner@haypocalc.com