MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / kill

Method kill

src/tasks/local_shell.py:113–128  ·  view source on GitHub ↗
(
        self, task_id: str, registry: "RuntimeTaskRegistry"
    )

Source from the content-addressed store, hash-verified

111 type: Literal["local_bash"] = "local_bash"
112
113 async def kill(
114 self, task_id: str, registry: "RuntimeTaskRegistry"
115 ) -> None:
116 state = registry.get(task_id)
117 if not is_local_shell_task(state):
118 return
119 assert isinstance(state, LocalShellTaskState) # narrow for mypy
120 proc = state.proc
121 if proc is None:
122 return
123 if proc.poll() is not None:
124 return
125 try:
126 os.killpg(os.getpgid(proc.pid), 15)
127 except (ProcessLookupError, PermissionError):
128 return
129
130
131# Per Chunk-C N1 fold-in: registration moved to

Callers 3

_kill_process_groupFunction · 0.45
_kill_process_groupFunction · 0.45
stop_taskFunction · 0.45

Calls 2

is_local_shell_taskFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected