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. |
It will call out to all the registered functions, letting them know that a graceful termination has been requested.
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.