Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm's 300,000 packages pre-installed, including process-exists with all npm packages installed. Try it out:

var processExists = require("process-exists")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

process-exists v2.1.0

Check if a process is running

process-exists Build Status

Check if a process is running

Install

$ npm install --save process-exists

Usage

const processExists = require('process-exists');

processExists(process.pid).then(exists => {
    console.log(exists);
    //=> true
});

API

processExists(input)

Returns a promise for a boolean.

input

Type: number, string

Process ID/name to check.

License

MIT © Sindre Sorhus

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free