bpo-35724: Explicitly require the main interpreter for signal-handling. (GH-11530)

Ensure that the main interpreter is active (in the main thread) for signal-handling operations. This is increasingly relevant as people use subinterpreters more.

https://bugs.python.org/issue35724
diff --git a/Include/cpython/pyerrors.h b/Include/cpython/pyerrors.h
index 0b43d75..de6548d 100644
--- a/Include/cpython/pyerrors.h
+++ b/Include/cpython/pyerrors.h
@@ -133,6 +133,7 @@
 /* In signalmodule.c */
 
 int PySignal_SetWakeupFd(int fd);
+PyAPI_FUNC(int) _PyErr_CheckSignals(void);
 
 /* Support for adding program text to SyntaxErrors */