MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / isProcessRunning

Function isProcessRunning

source code/utils/ide.ts:51–58  ·  view source on GitHub ↗
(pid: number)

Source from the content-addressed store, hash-verified

49import { jsonParse } from './slowOperations.js'
50
51function isProcessRunning(pid: number): boolean {
52 try {
53 process.kill(pid, 0)
54 return true
55 } catch {
56 return false
57 }
58}
59
60// Returns a function that lazily fetches our process's ancestor PID chain,
61// 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