MCPcopy Create free account
hub / github.com/claude-code-best/claude-code / isProcessAlive

Function isProcessAlive

src/daemon/state.ts:68–75  ·  view source on GitHub ↗

* Check if a process with the given PID is alive.

(pid: number)

Source from the content-addressed store, hash-verified

66 * Check if a process with the given PID is alive.
67 */
68function isProcessAlive(pid: number): boolean {
69 try {
70 process.kill(pid, 0)
71 return true
72 } catch {
73 return false
74 }
75}
76
77/**
78 * Query the daemon status by reading the state file and probing the PID.

Callers 2

queryDaemonStatusFunction · 0.85
stopDaemonByPidFunction · 0.85

Calls 1

killMethod · 0.45

Tested by

no test coverage detected