b.s.signals : module documentation

Part of bzrlib.smart

Signal handling for the smart server code.
Function install_sighup_handler Setup a handler for the SIGHUP signal.
Function restore_sighup_handler Pass in the returned value from install_sighup_handler to reset.
Function register_on_hangup Register for us to call a_callable as part of a graceful shutdown.
Function unregister_on_hangup Remove a callback from being called during sighup.
Function _sighup_handler This is the actual function that is registered for handling SIGHUP.
Function _setup_on_hangup_dict Create something for _on_sighup.
def _sighup_handler(signal_number, interrupted_frame):
This is the actual function that is registered for handling SIGHUP.

It will call out to all the registered functions, letting them know that a graceful termination has been requested.

def install_sighup_handler():
Setup a handler for the SIGHUP signal.
def _setup_on_hangup_dict():
Create something for _on_sighup.

This is done when we install the sighup handler, and for tests that want to test the functionality. If this hasn'nt been called, then register_on_hangup is a no-op. As is unregister_on_hangup.

def restore_sighup_handler(orig):
Pass in the returned value from install_sighup_handler to reset.
def register_on_hangup(identifier, a_callable):
Register for us to call a_callable as part of a graceful shutdown.
def unregister_on_hangup(identifier):
Remove a callback from being called during sighup.
API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.