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

Skip to content

Commit 2ec6b17

Browse files
author
Victor Stinner
committed
Issue #12060: Use sig_atomic_t type and volatile keyword in the signal module.
Patch written by Charles-François Natali.
1 parent 0b2489e commit 2ec6b17

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.1.4?
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
- Issue #1195: Fix input() if it is interrupted by CTRL+d and then CTRL+c,
1417
clear the end-of-file indicator after CTRL+d.
1518

Modules/signalmodule.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ static long main_thread;
7878
static pid_t main_pid;
7979
#endif
8080

81-
static struct {
82-
int tripped;
81+
static volatile struct {
82+
sig_atomic_t tripped;
8383
PyObject *func;
8484
} Handlers[NSIG];
8585

86-
static sig_atomic_t wakeup_fd = -1;
86+
static volatile sig_atomic_t wakeup_fd = -1;
8787

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

0 commit comments

Comments
 (0)