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

Function isProcessRunning

src/utils/ide.ts:49–56  ·  view source on GitHub ↗
(pid: number)

Source from the content-addressed store, hash-verified

47import { jsonParse } from './slowOperations.js'
48
49function isProcessRunning(pid: number): boolean {
50 try {
51 process.kill(pid, 0)
52 return true
53 } catch {
54 return false
55 }
56}
57
58// Returns a function that lazily fetches our process's ancestor PID chain,
59// caching within the closure's lifetime. Callers should scope this to a

Callers 5

cleanupStaleIdeLockfilesFunction · 0.70
detectIDEsFunction · 0.70
countConcurrentSessionsFunction · 0.70
tryAcquireSchedulerLockFunction · 0.70

Calls 1

killMethod · 0.45

Tested by

no test coverage detected