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

Function processIsAlive

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

Source from the content-addressed store, hash-verified

245}
246
247function processIsAlive(pid) {
248 if (!Number.isSafeInteger(pid) || pid <= 0) return false;
249 try {
250 process.kill(pid, 0);
251 return true;
252 } catch (err) {
253 // Access denial is conservative evidence of a live process. Only an
254 // explicit missing-process result permits reclamation.
255 return err && err.code !== 'ESRCH';
256 }
257}
258
259function readBinaryLockOwner(lockPath) {
260 try {

Callers 1

tryReclaimBinaryLockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected