[go: up one dir, main page]

Skip to content

twolfson/node-tree-kill

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Tree Kill

Kill all processes in the process tree, including the root process.

Example

var kill = require('tree-kill');
kill(1, 'SIGKILL');

In this example we kill all the children processes of the process with pid 1, including the process with pid 1 itself.

Methods

require('tree-kill')(pid, [signal]);

Sends signal signal to all children processes of the process with pid pid, including pid. Signal defaults to SIGTERM.

For Linux, this uses ps -o pid --no-headers --ppid PID to find the parent pids of PID.

For Windows, this uses 'taskkill /pid PID /T /F' to kill the process tree.

Install

With npm do:

npm install tree-kill

License

MIT

About

kill trees of processes

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%