diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2016-07-23 04:13:14 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2016-07-23 04:13:14 (GMT) |
commit | 1fd497ed91a14eabaf37e9b3f17dde8c3169ef25 (patch) | |
tree | 28c09ff0aacd4cded3be1defcdbfd92d4f388a4f | |
parent | 84544c1020241afdd0422449d621ce9b762cb6d1 (diff) | |
download | cpython-1fd497ed91a14eabaf37e9b3f17dde8c3169ef25.zip cpython-1fd497ed91a14eabaf37e9b3f17dde8c3169ef25.tar.gz cpython-1fd497ed91a14eabaf37e9b3f17dde8c3169ef25.tar.bz2 |
Issue #27591: Set sigint_event to NULL if _PyOS_IsMainThread() returns false
Patch by Chris Angelico.
-rw-r--r-- | Modules/_multiprocessing/semaphore.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/_multiprocessing/semaphore.c b/Modules/_multiprocessing/semaphore.c index de85a90..cea962a 100644 --- a/Modules/_multiprocessing/semaphore.c +++ b/Modules/_multiprocessing/semaphore.c @@ -114,6 +114,9 @@ semlock_acquire(SemLockObject *self, PyObject *args, PyObject *kwds) assert(sigint_event != NULL); handles[nhandles++] = sigint_event; } + else { + sigint_event = NULL; + } /* do the wait */ Py_BEGIN_ALLOW_THREADS |