continuously test if a process exists
npm install watch-pidContinuously calls process.kill with the specified pid and a signal of 0 to test the existance of a process with the corresponding pid. Repeats with a default delay of 1500 ms.
``javascriptwatch-pid
const watch = require()
watch(42, pid => {
console.log(Process with pid: ${pid} exited)`
})
pid - process identifier
callback - called with the pid when the process no longer exists.
delay` - delay between tests.