(pid)
| 383 | } |
| 384 | |
| 385 | function 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 | |
| 397 | function readBinaryLockOwner(lockPath) { |
| 398 | try { |
no outgoing calls
no test coverage detected