File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,3 +83,20 @@ int Context_Exit(PyObject *ctx) {
8383}
8484
8585#endif
86+
87+ /* inlined from cpython/Modules/signalmodule.c
88+ private _Py_RestoreSignals has been moved to CPython internals as of Python 3.13
89+ https://github.com/python/cpython/pull/106400 */
90+ void
91+ _Py_RestoreSignals (void )
92+ {
93+ #ifdef SIGPIPE
94+ PyOS_setsig (SIGPIPE , SIG_DFL );
95+ #endif
96+ #ifdef SIGXFZ
97+ PyOS_setsig (SIGXFZ , SIG_DFL );
98+ #endif
99+ #ifdef SIGXFSZ
100+ PyOS_setsig (SIGXFSZ , SIG_DFL );
101+ #endif
102+ }
Original file line number Diff line number Diff line change @@ -11,8 +11,6 @@ cdef extern from "Python.h":
1111 object PyUnicode_EncodeFSDefault(object )
1212 void PyErr_SetInterrupt() nogil
1313
14- void _Py_RestoreSignals()
15-
1614 object PyMemoryView_FromMemory(char * mem, ssize_t size, int flags)
1715 object PyMemoryView_FromObject(object obj)
1816 int PyMemoryView_Check(object obj)
@@ -29,3 +27,5 @@ cdef extern from "includes/compat.h":
2927 void PyOS_BeforeFork()
3028 void PyOS_AfterFork_Parent()
3129 void PyOS_AfterFork_Child()
30+
31+ void _Py_RestoreSignals()
You can’t perform that action at this time.
0 commit comments