1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

removed unused code for signal handling

This commit is contained in:
Brian Coca 2016-04-11 16:33:20 -04:00
parent 6a3b6ef2c7
commit b63238ff2c

View file

@ -78,20 +78,6 @@ class CLI(object):
self.action = None self.action = None
self.callback = callback self.callback = callback
def _terminate(self, signum=None, framenum=None):
if signum == signal.SIGTERM:
if hasattr(os, 'getppid'):
display.debug("Termination requested in parent, shutting down gracefully")
signal.signal(signal.SIGTERM, signal.SIG_DFL)
else:
display.debug("Term signal in child, harakiri!")
signal.signal(signal.SIGTERM, signal.SIG_IGN)
raise SystemExit
#NOTE: if ever want to make this immediately kill children use on parent:
#os.killpg(os.getpgid(0), signal.SIGTERM)
def set_action(self): def set_action(self):
""" """
Get the action the user wants to execute from the sys argv list. Get the action the user wants to execute from the sys argv list.
@ -124,8 +110,6 @@ class CLI(object):
else: else:
display.display(u"No config file found; using defaults") display.display(u"No config file found; using defaults")
# Manage user interruptions
#signal.signal(signal.SIGTERM, self._terminate)
@staticmethod @staticmethod
def ask_vault_passwords(ask_new_vault_pass=False, rekey=False): def ask_vault_passwords(ask_new_vault_pass=False, rekey=False):