mirror of
				https://github.com/jlu5/PyLink.git
				synced 2025-11-04 08:57:25 +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 883f9199ecf63ef91df25a5dc47d8f7d353d7af0. Conflicts: coremods/control.py
This commit is contained in:
		
							parent
							
								
									6bb2198710
								
							
						
					
					
						commit
						44be5910e0
					
				@ -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)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user