1.0.1 • Published 6 years ago

is-process-active v1.0.1

Weekly downloads
27
License
MIT
Repository
github
Last release
6 years ago

is-process-active

Build status CircleCI codecov npm npm npm David GitHub top language

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
}