From: Berker Peksag Date: Sat, 23 Jul 2016 04:13:14 +0000 (+0300) Subject: Issue #27591: Set sigint_event to NULL if _PyOS_IsMainThread() returns false X-Git-Tag: v3.6.0a4~135^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1fd497ed91a14eabaf37e9b3f17dde8c3169ef25;p=thirdparty%2FPython%2Fcpython.git Issue #27591: Set sigint_event to NULL if _PyOS_IsMainThread() returns false Patch by Chris Angelico. --- diff --git a/Modules/_multiprocessing/semaphore.c b/Modules/_multiprocessing/semaphore.c index de85a90d472a..cea962ab26c3 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