Part of lp.services.twistedsupport.processmonitor View In Hierarchy
Known subclasses: lp.services.twistedsupport.processmonitor.ProcessMonitorProtocol
Instance Variables | _clock | A provider of Twisted's IReactorTime, to allow testing that does not depend on an external clock. If a clock is not explicitly supplied the reactor is used. |
_sigkill_delayed_call | When we are terminating a process, we send SIGINT, wait a while and then send SIGKILL if required. We stash the DelayedCall here so that it can be cancelled if the SIGINT causes the process to exit. |
Method | __init__ | Construct an instance. |
Method | terminateProcess | Terminate the process by SIGINT initially, but SIGKILL if needed. |
Method | processEnded | See ProcessProtocol.processEnded . |
Method | _sigkill | Forcefully kill the process. |
Parameters | clock | A provider of Twisted's IReactorTime. This parameter exists to allow testing that does not depend on an external clock. If a clock is not passed in explicitly the reactor is used. |
Parameters | timeout | How many seconds to wait after the SIGINT before sending the SIGKILL. If None, use self.default_wait_before_kill instead. |