INNER CODE UNIT · Python
_sighup_handler
lebinh/ngxtop · ngxtop/ngxtop.py:227
def _sighup_handler(signum, frame):
"""Signal handler for SIGHUP - marks rotation as requested."""
global _rotation_requested
_rotation_requested = True
logging.info("SIGHUP received - will reopen log file on next check")
def _check_rotation_signal():
"""Check if log rotation was requested via signal."""
global _rotation_requested
return _rotation_requested
def _clear_rotation_signal():
"""Clear the rotation request flag."""
global _rotation_requested
_rotation_requested = False