aboutsummaryrefslogtreecommitdiffstats
path: root/python/gevent/signal.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/gevent/signal.py')
-rw-r--r--python/gevent/signal.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/gevent/signal.py b/python/gevent/signal.py
index fc46018..0954af8 100644
--- a/python/gevent/signal.py
+++ b/python/gevent/signal.py
@@ -33,7 +33,7 @@ _signal_getsignal = _signal.getsignal
def getsignal(signalnum):
"""
- Exactly the same as :func:`signal.signal` except where
+ Exactly the same as :func:`signal.getsignal` except where
:const:`signal.SIGCHLD` is concerned.
For :const:`signal.SIGCHLD`, this cooperates with :func:`signal`
@@ -95,12 +95,12 @@ def signal(signalnum, handler):
old_handler = getsignal(signalnum)
global _child_handler
_child_handler = handler
- if handler == _signal.SIG_IGN or handler == _signal.SIG_DFL:
+ if handler in (_signal.SIG_IGN, _signal.SIG_DFL):
# Allow resetting/ignoring this signal at the process level.
# Note that this conflicts with gevent.subprocess and other users
# of child watchers, until the next time gevent.subprocess/loop.install_sigchld()
# is called.
- from gevent import get_hub # Are we always safe to import here?
+ from gevent.hub import get_hub # Are we always safe to import here?
_signal_signal(signalnum, handler)
get_hub().loop.reset_sigchld()
return old_handler