MCPcopy Create free account
hub / github.com/agent0ai/agent-zero / _Proc

Class _Proc

plugins/_code_execution/helpers/tty_session.py:350–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348 await asyncio.sleep(0.01) # Give write time to complete
349
350 class _Proc:
351 def __init__(self):
352 self.stdin = _Stdin() # type: ignore
353 self.stdout = reader
354 self.pid = child.pid
355 self.returncode = None
356
357 async def wait(self):
358 while child.isalive():
359 await asyncio.sleep(0.2)
360 self.returncode = 0
361 return 0
362
363 def terminate(self):
364 if child.isalive():
365 child.terminate()
366
367 def kill(self):
368 if child.isalive():
369 child.kill()
370
371 return _Proc()
372

Callers 1

_spawn_winptyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected