MCPcopy
hub / github.com/RedPlanetHQ/core / waitForProcessExit

Function waitForProcessExit

packages/cli/src/server/tools/coding-tools.ts:447–457  ·  view source on GitHub ↗
(
	sessionId: string,
	timeoutMs: number,
)

Source from the content-addressed store, hash-verified

445// ============ Handlers ============
446
447async function waitForProcessExit(
448 sessionId: string,
449 timeoutMs: number,
450): Promise<boolean> {
451 const deadline = Date.now() + timeoutMs;
452 while (Date.now() < deadline) {
453 if (!isProcessRunning(sessionId)) return true;
454 await new Promise(resolve => setTimeout(resolve, 100));
455 }
456 return !isProcessRunning(sessionId);
457}
458
459async function handleAsk(
460 params: zod.infer<typeof AskSchema>,

Callers 1

handleAskFunction · 0.85

Calls 1

isProcessRunningFunction · 0.90

Tested by

no test coverage detected