mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-24 19:52:53 +01:00
parent
fa1ce45bf3
commit
a4dbd8d09f
@ -29,12 +29,13 @@ def _shutdown(irc=None):
|
||||
# Disconnect all our networks.
|
||||
remove_network(ircobj)
|
||||
|
||||
def sigterm_handler(_signo, _stack_frame):
|
||||
"""Handles SIGTERM gracefully by shutting down the PyLink daemon."""
|
||||
log.info("Shutting down on SIGTERM.")
|
||||
def sigterm_handler(signo, stack_frame):
|
||||
"""Handles SIGTERM and SIGINT gracefully by shutting down the PyLink daemon."""
|
||||
log.info("Shutting down on signal %s." % signo)
|
||||
_shutdown()
|
||||
|
||||
signal.signal(signal.SIGTERM, sigterm_handler)
|
||||
signal.signal(signal.SIGINT, sigterm_handler)
|
||||
|
||||
def _rehash():
|
||||
"""Rehashes the PyLink daemon."""
|
||||
|
Loading…
Reference in New Issue
Block a user