summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorAntoine Pitrou <pitrou@free.fr>2018-05-04 11:00:50 (GMT)
committerGitHub <noreply@github.com>2018-05-04 11:00:50 (GMT)
commit9d3627e311211a1b4abcda29c36fe4afe2c46532 (patch)
tree26f76c94bb55ee8b242f044efa26cfd8b08e9d26 /Doc/library
parent491bbedc209fea314a04cb3015da68fb0aa63238 (diff)
downloadcpython-9d3627e311211a1b4abcda29c36fe4afe2c46532.zip
cpython-9d3627e311211a1b4abcda29c36fe4afe2c46532.tar.gz
cpython-9d3627e311211a1b4abcda29c36fe4afe2c46532.tar.bz2
bpo-33332: Add signal.valid_signals() (GH-6581)
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/signal.rst13
1 files changed, 11 insertions, 2 deletions
diff --git a/Doc/library/signal.rst b/Doc/library/signal.rst
index 3f17e08..67ee979 100644
--- a/Doc/library/signal.rst
+++ b/Doc/library/signal.rst
@@ -216,6 +216,15 @@ The :mod:`signal` module defines the following functions:
.. versionadded:: 3.8
+.. function:: valid_signals()
+
+ Return the set of valid signal numbers on this platform. This can be
+ less than ``range(1, NSIG)`` if some signals are reserved by the system
+ for internal use.
+
+ .. versionadded:: 3.8
+
+
.. function:: pause()
Cause the process to sleep until a signal is received; the appropriate handler
@@ -268,8 +277,8 @@ The :mod:`signal` module defines the following functions:
argument.
*mask* is a set of signal numbers (e.g. {:const:`signal.SIGINT`,
- :const:`signal.SIGTERM`}). Use ``range(1, signal.NSIG)`` for a full mask
- including all signals.
+ :const:`signal.SIGTERM`}). Use :func:`~signal.valid_signals` for a full
+ mask including all signals.
For example, ``signal.pthread_sigmask(signal.SIG_BLOCK, [])`` reads the
signal mask of the calling thread.