From 44be5910e050456414bfd36c1f9c38d9ba3a9a6c Mon Sep 17 00:00:00 2001 From: James Lu Date: Sun, 21 Jan 2018 13:31:15 -0800 Subject: [PATCH] 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 883f9199ecf63ef91df25a5dc47d8f7d353d7af0. Conflicts: coremods/control.py --- coremods/control.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/coremods/control.py b/coremods/control.py index dfafc34..1a937ba 100644 --- a/coremods/control.py +++ b/coremods/control.py @@ -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)