summaryrefslogtreecommitdiffstats
path: root/Doc/library/signal.rst
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-05-04 11:20:35 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-05-04 11:20:35 (GMT)
commit35b300c5fd8406c0e05bc2a1e7e07e6db848571e (patch)
tree42d58a0b8cd807e58b0c26d5bb91614dcb1af9cf /Doc/library/signal.rst
parent6fd49e152ae173e4f89d5d547b828fa8af4072f2 (diff)
downloadcpython-35b300c5fd8406c0e05bc2a1e7e07e6db848571e.zip
cpython-35b300c5fd8406c0e05bc2a1e7e07e6db848571e.tar.gz
cpython-35b300c5fd8406c0e05bc2a1e7e07e6db848571e.tar.bz2
Issue #8407: signal.pthread_sigmask() returns a set instead of a list
Update the doc. Refactor also related tests.
Diffstat (limited to 'Doc/library/signal.rst')
-rw-r--r--Doc/library/signal.rst7
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/library/signal.rst b/Doc/library/signal.rst
index ffe7f09..f318cfa 100644
--- a/Doc/library/signal.rst
+++ b/Doc/library/signal.rst
@@ -184,7 +184,7 @@ The :mod:`signal` module defines the following functions:
Fetch and/or change the signal mask of the calling thread. The signal mask
is the set of signals whose delivery is currently blocked for the caller.
- The old signal mask is returned.
+ Return the old signal mask as a set of signals.
The behavior of the call is dependent on the value of *how*, as follows.
@@ -196,8 +196,9 @@ The :mod:`signal` module defines the following functions:
* :data:`SIG_SETMASK`: The set of blocked signals is set to the *mask*
argument.
- *mask* is a list of signal numbers (e.g. [:const:`signal.SIGINT`,
- :const:`signal.SIGTERM`]).
+ *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.
For example, ``signal.pthread_sigmask(signal.SIG_BLOCK, [])`` reads the
signal mask of the calling thread.