(pid)
| 245 | } |
| 246 | |
| 247 | function 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 | |
| 259 | function readBinaryLockOwner(lockPath) { |
| 260 | try { |
no outgoing calls
no test coverage detected