diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-04-04 14:57:24 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-04-04 14:57:24 (GMT) |
commit | a2b5bf01e75529352507ae74b9fba832f22a5faa (patch) | |
tree | 8d66b2981d93937258b2299710293410786608c4 /Lib/signal.py | |
parent | be9acefc6bdf6e71407cedfedae330b919ff0637 (diff) | |
download | cpython-a2b5bf01e75529352507ae74b9fba832f22a5faa.zip cpython-a2b5bf01e75529352507ae74b9fba832f22a5faa.tar.gz cpython-a2b5bf01e75529352507ae74b9fba832f22a5faa.tar.bz2 |
Issue #21076: sigpending() is not available on Windows
Diffstat (limited to 'Lib/signal.py')
-rw-r--r-- | Lib/signal.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/signal.py b/Lib/signal.py index 90e5313..0db3df8 100644 --- a/Lib/signal.py +++ b/Lib/signal.py @@ -68,10 +68,11 @@ if 'pthread_sigmask' in _globals: pthread_sigmask.__doc__ = _signal.pthread_sigmask.__doc__ -@_wraps(_signal.sigpending) -def sigpending(): - sigs = _signal.sigpending() - return set(_int_to_enum(x, Signals) for x in sigs) +if 'sigpending' in _globals: + @_wraps(_signal.sigpending) + def sigpending(): + sigs = _signal.sigpending() + return set(_int_to_enum(x, Signals) for x in sigs) if 'sigwait' in _globals: |