libb.DelayedKeyboardInterrupt
- class DelayedKeyboardInterrupt(propagate_to_forked_processes=None)[source]
Bases:
objectContext manager that suppresses SIGINT & SIGTERM during a block.
Signal handlers are called on exit from the block.
Note
Inspired by https://stackoverflow.com/a/21919644
- Parameters:
propagate_to_forked_processes – Controls behavior in forked processes: - True: Same behavior as parent process - False: Use original signal handler - None: Ignore signals (default)