diff --git a/index.js b/index.js index 125afdc..8348b4b 100755 --- a/index.js +++ b/index.js @@ -5,6 +5,10 @@ var spawn = childProcess.spawn; var exec = childProcess.exec; module.exports = function (pid, signal, callback) { + if (typeof pid !== "number") { + throw new Error("pid must be a number"); + } + var tree = {}; var pidsToProcess = {}; tree[pid] = [];