rad  3.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Public Attributes | List of all members
etr.tools.subprocess.SignalContextManager Class Reference

Provides a context manager to be able to captue signals and forward them to a subprocess within a context manager scope. More...

Public Member Functions

def __init__ (self, process, signals=(signal.SIGINT, signal.SIGTERM))
 
def __enter__ (self)
 
def __exit__ (self, type_, value, traceback)
 

Public Attributes

 process
 
 signals
 
 original_handlers
 
 aborted
 

Detailed Description

Provides a context manager to be able to captue signals and forward them to a subprocess within a context manager scope.

@raises etr.exception.AbortException after signal has been forwarded to subprocess.

Constructor & Destructor Documentation

◆ __init__()

def etr.tools.subprocess.SignalContextManager.__init__ (   self,
  process,
  signals = (signal.SIGINT, signal.SIGTERM) 
)

Member Function Documentation

◆ __enter__()

def etr.tools.subprocess.SignalContextManager.__enter__ (   self)

◆ __exit__()

def etr.tools.subprocess.SignalContextManager.__exit__ (   self,
  type_,
  value,
  traceback 
)

Member Data Documentation

◆ aborted

etr.tools.subprocess.SignalContextManager.aborted

◆ original_handlers

etr.tools.subprocess.SignalContextManager.original_handlers

◆ process

etr.tools.subprocess.SignalContextManager.process

◆ signals

etr.tools.subprocess.SignalContextManager.signals

The documentation for this class was generated from the following file: