bpo-33332: Add signal.valid_signals() (GH-6581)

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 @@
    .. 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 @@
      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.