def _signal_handler(signum: int, _: Any) -> None:
    "Kill all spawned processes and exit.\n\n    Note that it's possible for another thread to spawn a process after\n    all processes have been killed, but before Python exits.\n\n    Refer to the docstring for _terminate_processes() for other caveats.\n    "
    _terminate_processes()
    sys.exit(signum)
Kill all spawned processes and exit.

Note that it's possible for another thread to spawn a process after
all processes have been killed, but before Python exits.

Refer to the docstring for _terminate_processes() for other caveats.
def _signal_handler(signum: int, _: Any) -> None:
    "Kill all spawned processes and exit.\n\n    Note that it's possible for another thread to spawn a process after\n    all processes have been killed, but before Python exits.\n\n    Refer to the docstring for _terminate_processes() for other caveats.\n    "
    _terminate_processes()
    sys.exit(signum)