-/* Unblocks program termination signals blocked by fatal_signal_block() is
- * called. If multiple calls to fatal_signal_block() are nested,
- * fatal_signal_unblock() must be called the same number of times to unblock
- * signals. */
+/* Registers 'hook_cb' to be called from inside poll_block() following a fatal
+ * signal. 'hook_cb' does not need to be async-signal-safe. In a
+ * multithreaded program 'hook_cb' might be called from any thread, with
+ * threads other than the one running 'hook_cb' in unknown states.
+ *
+ * If 'run_at_exit' is true, 'hook_cb' is also called during normal process
+ * termination, e.g. when exit() is called or when main() returns.
+ *
+ * If the current process forks, fatal_signal_fork() may be called to clear the
+ * parent process's fatal signal hooks, so that 'hook_cb' is only called when
+ * the child terminates, not when the parent does. When fatal_signal_fork() is
+ * called, it calls the 'cancel_cb' function if it is nonnull, passing 'aux',
+ * to notify that the hook has been canceled. This allows the hook to free
+ * memory, etc. */