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

Function isPidAlive

src/utils/process-liveness.ts:1–13  ·  view source on GitHub ↗
(pid: number)

Source from the content-addressed store, hash-verified

1export function isPidAlive(pid: number): boolean {
2 if (!Number.isInteger(pid) || pid <= 0) {
3 return false;
4 }
5
6 try {
7 process.kill(pid, 0);
8 return true;
9 } catch (error) {
10 const code = (error as NodeJS.ErrnoException).code;
11 return code !== 'ESRCH';
12 }
13}

Callers 10

hasLiveHelperPidInNameFunction · 0.90
collectProtectedLogPathsFunction · 0.90
shouldRecoverLockDirFunction · 0.90
shouldRecoverLockDirFunction · 0.90
isOwnerPidAliveFunction · 0.90
waitForPidExitFunction · 0.90
canRemoveRegistryEntryFunction · 0.90

Calls 1

killMethod · 0.65

Tested by

no test coverage detected