MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / isPidAlive

Function isPidAlive

apps/desktop/src/main/sidecar.ts:112–121  ·  view source on GitHub ↗
(pid: number)

Source from the content-addressed store, hash-verified

110 join(serverControlDir(dataDir), "server.json");
111
112const isPidAlive = (pid: number): boolean => {
113 if (!Number.isInteger(pid) || pid <= 0) return false;
114 // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: Node process probing API reports liveness by throwing
115 try {
116 process.kill(pid, 0);
117 return true;
118 } catch {
119 return false;
120 }
121};
122
123const readManifest = (dataDir: string) => {
124 const path = localServerManifestPath(dataDir);

Callers

nothing calls this directly

Calls 1

killMethod · 0.80

Tested by

no test coverage detected