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

Function wait_and_read_mdm

src/prefetch.py:221–233  ·  view source on GitHub ↗

Block until the MDM-read child process exits; return stdout JSON or None.

(handle: PrefetchHandle, timeout: float = 2.0)

Source from the content-addressed store, hash-verified

219
220
221def wait_and_read_mdm(handle: PrefetchHandle, timeout: float = 2.0) -> str | None:
222 """Block until the MDM-read child process exits; return stdout JSON or None."""
223 if handle.process is None:
224 return None
225 try:
226 stdout, _stderr = handle.process.communicate(timeout=timeout)
227 except subprocess.TimeoutExpired:
228 handle.process.kill()
229 return None
230 if handle.process.returncode != 0:
231 return None
232 text = stdout.decode("utf-8", errors="replace").strip()
233 return text or None
234
235
236def start_project_scan(root: Path) -> PrefetchHandle:

Callers 2

initFunction · 0.90

Calls 2

communicateMethod · 0.45
killMethod · 0.45

Tested by 1