Skip to content
Merged
Changes from 3 commits
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
17 changes: 17 additions & 0 deletions Doc/c-api/sys.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,23 @@ Operating System Utilities
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)
Comment thread
StanFromIreland marked this conversation as resolved.

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.
Comment thread
StanFromIreland marked this conversation as resolved.

This function is async-signal-safe and this function cannot fail.
The caller must hold an :term:`attached thread state`.
Comment thread
StanFromIreland marked this conversation as resolved.
Outdated

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.


.. c:function:: wchar_t* Py_DecodeLocale(const char* arg, size_t *size)

.. warning::
Expand Down
Loading