MCPcopy Create free account
hub / github.com/AutoForgeAI/autoforge / KillResult

Class KillResult

server/utils/process_utils.py:19–37  ·  view source on GitHub ↗

Result of a process tree kill operation. Attributes: status: "success" if all processes terminated, "partial" if some required force-kill, "failure" if parent couldn't be killed parent_pid: PID of the parent process children_found: Number of child processes f

Source from the content-addressed store, hash-verified

17
18@dataclass
19class KillResult:
20 """Result of a process tree kill operation.
21
22 Attributes:
23 status: "success" if all processes terminated, "partial" if some required
24 force-kill, "failure" if parent couldn't be killed
25 parent_pid: PID of the parent process
26 children_found: Number of child processes found
27 children_terminated: Number of children that terminated gracefully
28 children_killed: Number of children that required SIGKILL
29 parent_forcekilled: Whether the parent required SIGKILL
30 """
31
32 status: Literal["success", "partial", "failure"]
33 parent_pid: int
34 children_found: int = 0
35 children_terminated: int = 0
36 children_killed: int = 0
37 parent_forcekilled: bool = False
38
39
40def kill_process_tree(proc: subprocess.Popen, timeout: float = 5.0) -> KillResult:

Callers 1

kill_process_treeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected