fkill
Fabulously kill processes. Cross-platform.
Last updated 6 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm
$ cnpm install fkill 
SYNC missed versions from official npm registry.


fkill


Fabulously kill processes. Cross-platform.

Build Status

Works on macOS (10.13 or later), Linux, Windows.

Install

$ npm install fkill

Usage

const fkill = require('fkill');

(async () => {
	await fkill(1337);
	console.log('Killed process');
})();

fkill('Safari');
fkill(':8080');

fkill([1337, 'Safari', ':8080']);

API

fkill(input, options?)

Returns a promise that resolves when the process is killed.

input

Type: number | string | Array<number | string>

One or more process IDs/names/ports to kill.

To kill a port, prefix it with a colon. For example: :8080.

options

Type: object

force

Type: boolean
Default: false

Force kill the process.

tree

Type: boolean
Default: true

Kill all child processes along with the parent process. (Windows only)

ignoreCase

Type: boolean
Default: false

Ignore capitalization when killing a process.

Note that the case is always ignored on Windows.

silent

Type: boolean
Default: false

Suppress all error messages. For example: Process doesn't exist.

Related

Current Tags

  • 8.0.1                                ...           latest (3 years ago)

3 Versions

  • 8.0.1                                ...           3 years ago
  • 7.2.1                                ...           4 years ago
  • 6.2.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (6)
Dev Dependencies (6)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org