MCPcopy Create free account
hub / github.com/Noumena-Network/code / isProcessRunning

Function isProcessRunning

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

Source from the content-addressed store, hash-verified

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