diff options
author | Jean-Paul Calderone <exarkun@divmod.com> | 2010-06-19 19:58:37 (GMT) |
---|---|---|
committer | Jean-Paul Calderone <exarkun@divmod.com> | 2010-06-19 19:58:37 (GMT) |
commit | 6ed7ac48ec7800d18b3361038f346ea43bea7e80 (patch) | |
tree | 3808d7d1e25ab9ebd6000feadb25bf82e75d7c81 /Doc/library/signal.rst | |
parent | 867c4354609b09b2425b188f212e54fc027be18f (diff) | |
download | cpython-6ed7ac48ec7800d18b3361038f346ea43bea7e80.zip cpython-6ed7ac48ec7800d18b3361038f346ea43bea7e80.tar.gz cpython-6ed7ac48ec7800d18b3361038f346ea43bea7e80.tar.bz2 |
Revert r82089. Commit was intended for a branch.
Diffstat (limited to 'Doc/library/signal.rst')
-rw-r--r-- | Doc/library/signal.rst | 81 |
1 files changed, 3 insertions, 78 deletions
diff --git a/Doc/library/signal.rst b/Doc/library/signal.rst index 26d9320..7b40e8e 100644 --- a/Doc/library/signal.rst +++ b/Doc/library/signal.rst @@ -13,6 +13,9 @@ rules for working with signals and their handlers: underlying implementation), with the exception of the handler for :const:`SIGCHLD`, which follows the underlying implementation. +* There is no way to "block" signals temporarily from critical sections (since + this is not supported by all Unix flavors). + * Although Python signal handlers are called asynchronously as far as the Python user is concerned, they can only occur between the "atomic" instructions of the Python interpreter. This means that signals arriving during long calculations @@ -112,46 +115,6 @@ The variables defined in the :mod:`signal` module are: in user and kernel space. SIGPROF is delivered upon expiration. -.. data:: SIG_BLOCK - - A possible value for the *how* parameter to :func:`sigprocmask` - indicating that signals are to be blocked. - - .. versionadded:: 2.7 - - -.. data:: SIG_UNBLOCK - - A possible value for the *how* parameter to :func:`sigprocmask` - indicating that signals are to be unblocked. - - .. versionadded:: 2.7 - - -.. data:: SIG_SETMASK - - A possible value for the *how* parameter to :func:`sigprocmask` - indicating that the signal mask is to be replaced. - - .. versionadded:: 2.7 - - -.. data:: SFD_CLOEXEC - - A possible flag in the *flags* parameter to :func:`signalfd` which causes - the new file descriptor to be marked as close-on-exec. - - .. versionadded:: 2.7 - - -.. data:: SFD_NONBLOCK - - A possible flag in the *flags* parameter to :func:`signalfd` which causes - the new file description to be set non-blocking. - - .. versionadded:: 2.7 - - The :mod:`signal` module defines one exception: .. exception:: ItimerError @@ -264,44 +227,6 @@ The :mod:`signal` module defines the following functions: attribute descriptions in the :mod:`inspect` module). -.. function:: signalfd(fd, mask[, flags]) - - Create a new file descriptor on which to receive signals or modify the - mask of such a file descriptor previously created by this function. - Availability: Linux (See the manpage :manpage:`signalfd(2)` for further - information). - - If *fd* is ``-1``, a new file descriptor will be created. Otherwise, - *fd* must be a file descriptor previously returned by this function. - - *mask* is a list of signal numbers which will trigger data on this file - descriptor. - - *flags* is a bit mask which may include any :const:`signal.SFD_*` flag. - - .. versionadded:: 2.7 - - -.. function:: sigprocmask(how, mask) - - Set the signal mask for the process. The old signal mask is returned. - Availability: Unix (See the Unix man page :manpage:`sigprocmask(2)` and - :manpage:`pthread_sigmask(2)`.) - - If *how* is :const:`signal.SIG_BLOCK`, the signals in the mask are added - to the set of blocked signals. - - If *how* is :const:`signal.SIG_UNBLOCK`, the signals in the mask are - removed from the set of blocked signals. - - If *how* is :const:`signal.SIG_SETMASK`, the signals in the mask are set - as blocked and the signals not in the mask are set as unblocked. - - *mask* is a list of signal numbers (eg :const:`signal.SIGUSR1`). - - .. versionadded:: 2.7 - - .. _signal-example: Example |