coexist.utilities.SignalHandlerKI#

class coexist.utilities.SignalHandlerKI(signals=['SIGINT', 'SIGTERM', 'SIGBREAK', 'SIGABRT'])[source]#

Bases: object

Handle typical OS termination signals by raising a KeyboardInterrupt exception.

If a signal is not found on a given platform (e.g. SIGBREAK only exists on Windows) it is simply skipped.

__init__(signals=['SIGINT', 'SIGTERM', 'SIGBREAK', 'SIGABRT'])[source]#

Methods

__init__([signals])

set()

Set the signals' handlers.

unset()

Unset the signals' handlers.

set()[source]#

Set the signals’ handlers. Save the previous handlers.

unset()[source]#

Unset the signals’ handlers. Return to previous handlers.