Skip to content

Commit

Permalink
Merge pull request #130 from nnDarshan/FixSignalIssue
Browse files Browse the repository at this point in the history
Fix Unavailable gevent.signal.SIGTERM issue
  • Loading branch information
r0h4n committed Jan 27, 2017
2 parents a924588 + e6b0449 commit e1fa8f2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tendrl/gluster_integration/manager/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import logging

import gevent.event
import signal

from tendrl.commons import manager as common_manager
from tendrl.gluster_integration import sds_sync
Expand Down Expand Up @@ -39,8 +40,8 @@ def shutdown():
LOG.info("Signal handler: stopping")
complete.set()

gevent.signal(gevent.signal.SIGTERM, shutdown)
gevent.signal(gevent.signal.SIGINT, shutdown)
gevent.signal(signal.SIGTERM, shutdown)
gevent.signal(signal.SIGINT, shutdown)

while not complete.is_set():
complete.wait(timeout=1)
Expand Down

0 comments on commit e1fa8f2

Please sign in to comment.