Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Doc/c-api/sys.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,24 @@
This is a thin wrapper around either :c:func:`!sigaction` or :c:func:`!signal`. Do
not call those functions directly!
.. c:function:: int PyOS_InterruptOccurred(void)
Check if a :c:macro:`!SIGINT` signal has been received.
Returns ``1`` if a :c:macro:`!SIGINT` has occurred and clears the signal flag,
or ``0`` otherwise.
In most cases, you should prefer :c:func:`PyErr_CheckSignals` over this function.
:c:func:`!PyErr_CheckSignals` invokes the appropriate signal handlers
for all pending signals, allowing Python code to handle the signal properly.
This function only detects :c:macro:`!SIGINT` and does not invoke any Python
signal handlers.
This function is async-signal-safe and this function cannot fail.

Check warning on line 140 in Doc/c-api/sys.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

term not in glossary: 'attached thread state' [ref.term]
The caller must hold an :term:`attached thread state`.
.. c:function:: wchar_t* Py_DecodeLocale(const char* arg, size_t *size)
.. warning::
Expand Down
Loading