Commit 1fd497ed authored by Berker Peksag's avatar Berker Peksag

Issue #27591: Set sigint_event to NULL if _PyOS_IsMainThread() returns false

Patch by Chris Angelico.
parent 84544c10
...@@ -114,6 +114,9 @@ semlock_acquire(SemLockObject *self, PyObject *args, PyObject *kwds) ...@@ -114,6 +114,9 @@ semlock_acquire(SemLockObject *self, PyObject *args, PyObject *kwds)
assert(sigint_event != NULL); assert(sigint_event != NULL);
handles[nhandles++] = sigint_event; handles[nhandles++] = sigint_event;
} }
else {
sigint_event = NULL;
}
/* do the wait */ /* do the wait */
Py_BEGIN_ALLOW_THREADS Py_BEGIN_ALLOW_THREADS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment