diff --git a/poc-grpc-agent/agent_node/skills/shell.py b/poc-grpc-agent/agent_node/skills/shell.py index ae681a1..8b4b1e0 100644 --- a/poc-grpc-agent/agent_node/skills/shell.py +++ b/poc-grpc-agent/agent_node/skills/shell.py @@ -54,3 +54,11 @@ p.kill() return True return False + def shutdown(self): + """Standard cleanup: Terminates all active shell processes.""" + with self.lock: + for tid, p in list(self.processes.items()): + print(f"[🛑] Killing Orphan Shell Task: {tid}") + try: p.kill() + except: pass + self.processes.clear()