Starts a thread to start killing |process| if it doesn't die before |timeout| seconds have elapsed.
(process: WrappedPopen, kill_children: bool,
timeout: int)
| 53 | |
| 54 | |
| 55 | def _start_kill_thread(process: WrappedPopen, kill_children: bool, |
| 56 | timeout: int) -> threading.Timer: |
| 57 | """Starts a thread to start killing |process| if it doesn't die before |
| 58 | |timeout| seconds have elapsed.""" |
| 59 | # TODO(metzman): Figure out if we should kill descendant processes. |
| 60 | timer = threading.Timer(timeout, _end_process, [process, kill_children]) |
| 61 | timer.start() |
| 62 | return timer |
| 63 | |
| 64 | |
| 65 | ProcessResult = collections.namedtuple('ProcessResult', |