3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-24 11:42:51 +01:00

Revert "control: move rehash signal to SIGUSR1, and shutdown on SIGHUP (terminal close)"

This wasn't an incredibly popular decision because it broke a simple 'pylink &'

This reverts commit 883f9199ec.

Conflicts:
	coremods/control.py
This commit is contained in:
James Lu 2018-01-21 13:31:15 -08:00
parent 6bb2198710
commit 44be5910e0

View File

@ -139,11 +139,10 @@ def rehash():
log.info('Finished reloading PyLink configuration.')
if os.name == 'posix':
# Only register SIGHUP/SIGUSR1 on *nix.
def _sigusr1_handler(_signo, _stack_frame):
"""Handles SIGUSR1 by rehashing the PyLink daemon."""
log.info("SIGUSR1 received, reloading config.")
# Only register SIGHUP on *nix.
def sighup_handler(_signo, _stack_frame):
"""Handles SIGHUP by rehashing the PyLink daemon."""
log.info("SIGHUP received, reloading config.")
rehash()
signal.signal(signal.SIGUSR1, _sigusr1_handler)
signal.signal(signal.SIGHUP, _sigterm_handler)
signal.signal(signal.SIGHUP, sighup_handler)