MCPcopy Create free account
hub / github.com/UTD-FAST-Lab/RevBugBench / _end_process

Function _end_process

triage/utils/new_process.py:41–52  ·  view source on GitHub ↗

Sends SIGKILL to |process| and kills child processes if |kill_children|.

(wrapped_process: WrappedPopen, kill_children: bool)

Source from the content-addressed store, hash-verified

39
40
41def _end_process(wrapped_process: WrappedPopen, kill_children: bool):
42 """Sends SIGKILL to |process| and kills child processes if
43 |kill_children|."""
44 try:
45 process_group_id = os.getpgid(wrapped_process.process.pid)
46 except ProcessLookupError:
47 process_group_id = None
48
49 wrapped_process.process.kill()
50 wrapped_process.timed_out = True
51 if kill_children and process_group_id is not None:
52 _kill_process_group(process_group_id)
53
54
55def _start_kill_thread(process: WrappedPopen, kill_children: bool,

Callers

nothing calls this directly

Calls 1

_kill_process_groupFunction · 0.85

Tested by

no test coverage detected