From bc46cdbc6beb2b1d0c29d99c898cb222a7883bde Mon Sep 17 00:00:00 2001 From: Eoin Shaughnessy Date: Sun, 19 Apr 2026 15:45:08 +0100 Subject: [PATCH] gh-100557: Clarify signal.pause() docs to explain it only wakes on handled signals --- Doc/library/signal.rst | 5 +++-- .../2026-04-18-12-38-41.gh-issue-100557.a6MWvZ.rst | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 Misc/NEWS.d/next/Documentation/2026-04-18-12-38-41.gh-issue-100557.a6MWvZ.rst diff --git a/Doc/library/signal.rst b/Doc/library/signal.rst index 12ad45f557e6db..baee264e50ce94 100644 --- a/Doc/library/signal.rst +++ b/Doc/library/signal.rst @@ -419,8 +419,9 @@ The :mod:`!signal` module defines the following functions: .. function:: pause() - Cause the process to sleep until a signal is received; the appropriate handler - will then be called. Returns nothing. + Cause the process to sleep until a signal with an installed handler is + delivered; the handler will then be called. Signals that are ignored or + set to the default action do not wake the process. Returns nothing. .. availability:: Unix. diff --git a/Misc/NEWS.d/next/Documentation/2026-04-18-12-38-41.gh-issue-100557.a6MWvZ.rst b/Misc/NEWS.d/next/Documentation/2026-04-18-12-38-41.gh-issue-100557.a6MWvZ.rst new file mode 100644 index 00000000000000..eac31c915f2fc8 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2026-04-18-12-38-41.gh-issue-100557.a6MWvZ.rst @@ -0,0 +1,4 @@ +Clarify the documentation for :func:`signal.pause` to explain that it only +returns when a signal with an installed handler is delivered, not when an +ignored signal arrives. +###########################################################################