]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #27591: Set sigint_event to NULL if _PyOS_IsMainThread() returns false
authorBerker Peksag <berker.peksag@gmail.com>
Sat, 23 Jul 2016 04:13:14 +0000 (07:13 +0300)
committerBerker Peksag <berker.peksag@gmail.com>
Sat, 23 Jul 2016 04:13:14 +0000 (07:13 +0300)
Patch by Chris Angelico.

Modules/_multiprocessing/semaphore.c

index de85a90d472a8b46b27f22b310ce38cda582680c..cea962ab26c3f1e137693159ff866c46639a5b5e 100644 (file)
@@ -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