MCPcopy Index your code
hub / github.com/codeaashu/claude-code / isProcessRunning

Function isProcessRunning

src/utils/genericProcessUtils.ts:20–28  ·  view source on GitHub ↗
(pid: number)

Source from the content-addressed store, hash-verified

18 * is conservative for lock recovery (we won't steal a live lock).
19 */
20export function isProcessRunning(pid: number): boolean {
21 if (pid <= 1) return false
22 try {
23 process.kill(pid, 0)
24 return true
25 } catch {
26 return false
27 }
28}
29
30/**
31 * Gets the ancestor process chain for a given process (up to maxDepth levels)

Callers

nothing calls this directly

Calls 1

killMethod · 0.45

Tested by

no test coverage detected