tree-kill
Advanced tools
Comparing version 0.0.6 to 0.1.0
18
index.js
@@ -7,5 +7,5 @@ var childProcess = require('child_process'); | ||
module.exports = function (pid, signal) { | ||
module.exports = function (pid, signal, callback) { | ||
if (isWindows) { | ||
exec('taskkill /pid ' + pid + ' /T /F'); | ||
exec('taskkill /pid ' + pid + ' /T /F', callback); | ||
} else { | ||
@@ -17,3 +17,15 @@ var tree = {}; | ||
buildProcessTree(pid, tree, pidsToProcess, function () { | ||
killAll(tree, signal); | ||
try { | ||
killAll(tree, signal); | ||
} | ||
catch (err) { | ||
if (callback) { | ||
return callback(err); | ||
} else { | ||
throw err; | ||
} | ||
} | ||
if (callback) { | ||
return callback(); | ||
} | ||
}); | ||
@@ -20,0 +32,0 @@ } |
{ | ||
"name" : "tree-kill", | ||
"version" : "0.0.6", | ||
"version" : "0.1.0", | ||
"description" : "kill trees of processes", | ||
@@ -32,2 +32,7 @@ "main" : "index.js", | ||
"url" : "http://twolfson.com/" | ||
}, | ||
{ | ||
"name" : "William Hilton", | ||
"email" : "wmhilton@gmail.com", | ||
"url" : "http://wmhilton.com/" | ||
} | ||
@@ -34,0 +39,0 @@ ], |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
91
48
4463
3
2