File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,24 @@ Operating System Utilities
123123 This is a thin wrapper around either :c:func: `!sigaction ` or :c:func: `!signal `. Do
124124 not call those functions directly!
125125
126+
127+ .. c :function :: int PyOS_InterruptOccurred (void)
128+
129+ Check if a :c:macro:`!SIGINT` signal has been received.
130+
131+ Returns ``1`` if a :c:macro:`!SIGINT` has occurred and clears the signal flag,
132+ or ``0`` otherwise.
133+
134+ In most cases, you should prefer :c:func:`PyErr_CheckSignals` over this function.
135+ :c:func:`!PyErr_CheckSignals` invokes the appropriate signal handlers
136+ for all pending signals, allowing Python code to handle the signal properly.
137+ This function only detects :c:macro:`!SIGINT` and does not invoke any Python
138+ signal handlers.
139+
140+ This function is async-signal-safe and this function cannot fail.
141+ The caller must hold an :term:`attached thread state`.
142+
143+
126144.. c:function:: wchar_t* Py_DecodeLocale(const char* arg, size_t *size)
127145
128146 .. warning ::
You can’t perform that action at this time.
0 commit comments