Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aedb282

Browse files
author
Victor Stinner
committed
(Merge 3.2) Issue #12060: Use sig_atomic_t type and volatile keyword in the
signal module. Patch written by Charles-François Natali.
2 parents 5ed2e77 + 5ebfe6d commit aedb282

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ What's New in Python 3.3 Alpha 1?
1010
Core and Builtins
1111
-----------------
1212

13+
- Issue #12060: Use sig_atomic_t type and volatile keyword in the signal
14+
module. Patch written by Charles-François Natali.
15+
1316
- Added the if_nameindex, if_indextoname, if_nametoindex methods to
1417
the socket module as requested in issue #1746656.
1518

Modules/signalmodule.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ static long main_thread;
8888
static pid_t main_pid;
8989
#endif
9090

91-
static struct {
92-
int tripped;
91+
static volatile struct {
92+
sig_atomic_t tripped;
9393
PyObject *func;
9494
} Handlers[NSIG];
9595

96-
static sig_atomic_t wakeup_fd = -1;
96+
static volatile sig_atomic_t wakeup_fd = -1;
9797

9898
/* Speed up sigcheck() when none tripped */
9999
static volatile sig_atomic_t is_tripped = 0;

0 commit comments

Comments
 (0)