xps
is a cross-platform library for listing and killing processes.
var ps = require('xps');
ps.list().fork(
function(error) {
throw error
},
function(processes) {
processes.forEach(function(process){
console.log(process.name + ': ' + process.pid)
})
}
);
ps.kill(123).fork(
function(error){ console.log('Unable to kill 123') },
function(){ console.log('Killed 123') }
);
You can grab the latest release from npm:
$ npm install xps
xps
requires either io.js or Node.js 0.10+
Copyright (c) 2015 Quildreen Motta.
Released under the MIT licence.