package
check existence of process by pid
npm install check-processGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
check existence of process by pid
const check = require('check-process')
const cp = require('child_process')
// return { exists: true, killable: false }
check(1)
// return { exists: true, killable: true }
let child = cp.exec(process.execPath, [someScript])
check(child.pid)check(pid)pid, {Number} process PIDCheck existence of process by pid.
Return a object:
{
exists: <Boolean>, // is process exists
killable: <Boolean> // is process killable
}MIT