diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2016-04-23 23:59:16 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2016-04-23 23:59:16 (GMT) |
commit | 77e543c6cdd40debd215fa6e913fcc64c0748eb0 (patch) | |
tree | b3256fec11acdb17c877e0556f5aa18413882c5a /Doc/library/signal.rst | |
parent | 0269828320920b307ca20746ec70e8f63af64089 (diff) | |
download | cpython-77e543c6cdd40debd215fa6e913fcc64c0748eb0.zip cpython-77e543c6cdd40debd215fa6e913fcc64c0748eb0.tar.gz cpython-77e543c6cdd40debd215fa6e913fcc64c0748eb0.tar.bz2 |
Issue #21382: Clarify signal.signal() documentation on Windows
All signal.SIG* constants may not be defined on Windows so a call like
signal.signal(signal.SIGPIPE, lambda signum, frame: sys.exit(1))
will raise an AttributeError.
Diffstat (limited to 'Doc/library/signal.rst')
-rw-r--r-- | Doc/library/signal.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Doc/library/signal.rst b/Doc/library/signal.rst index 98eb7fd..d02a0a8 100644 --- a/Doc/library/signal.rst +++ b/Doc/library/signal.rst @@ -351,6 +351,9 @@ The :mod:`signal` module defines the following functions: On Windows, :func:`signal` can only be called with :const:`SIGABRT`, :const:`SIGFPE`, :const:`SIGILL`, :const:`SIGINT`, :const:`SIGSEGV`, or :const:`SIGTERM`. A :exc:`ValueError` will be raised in any other case. + Note that not all systems define the same set of signal names; an + :exc:`AttributeError` will be raised if a signal name is not defined as + ``SIG*`` module level constant. .. function:: sigpending() |