$ cnpm install is-process-active
Cross-platform support for detecting if a process pid is active. Uses process.kill(pid, 0) on unix and tasklist.exe on Windows.
Usage:
const pid = require('is-process-active')
if (pid.activeSync(myPid)) {
// do something if process is active
}
// or...
if (await pid.active(myPid)) {
// do something if process is active
}
Copyright 2013 - present © cnpmjs.org | Home |