MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / processIsAlive

Function processIsAlive

pkg/npm/install.js:385–395  ·  view source on GitHub ↗
(pid)

Source from the content-addressed store, hash-verified

383}
384
385function processIsAlive(pid) {
386 if (!Number.isSafeInteger(pid) || pid <= 0) return false;
387 try {
388 process.kill(pid, 0);
389 return true;
390 } catch (err) {
391 // Access denial is conservative evidence of a live process. Only an
392 // explicit missing-process result permits reclamation.
393 return err && err.code !== 'ESRCH';
394 }
395}
396
397function readBinaryLockOwner(lockPath) {
398 try {

Callers 1

tryReclaimBinaryLockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected