MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / waitForPidExit

Function waitForPidExit

src/cli/daemon-control.ts:28–37  ·  view source on GitHub ↗
(pid: number, timeoutMs: number)

Source from the content-addressed store, hash-verified

26const FORCE_STOP_POLL_INTERVAL_MS = 50;
27
28async function waitForPidExit(pid: number, timeoutMs: number): Promise<boolean> {
29 const deadline = Date.now() + timeoutMs;
30 while (Date.now() < deadline) {
31 if (!isPidAlive(pid)) {
32 return true;
33 }
34 await new Promise((resolveDelay) => setTimeout(resolveDelay, FORCE_STOP_POLL_INTERVAL_MS));
35 }
36 return !isPidAlive(pid);
37}
38
39function validateCurrentRegistryEntry(
40 expectedEntry: DaemonRegistryEntry,

Callers 1

forceStopDaemonFunction · 0.85

Calls 1

isPidAliveFunction · 0.90

Tested by

no test coverage detected