properly kill the node-inspector subprocesses
diff --git a/client/lib/debug-nodejs.js b/client/lib/debug-nodejs.js index 55db610..6276510 100644 --- a/client/lib/debug-nodejs.js +++ b/client/lib/debug-nodejs.js
@@ -18,6 +18,7 @@ ok_ = require('./repl-messages').ok_, tmp = require('tmp'), diff = require('./diff'), + kill = require('tree-kill'), open = require('open'), path = require('path'), spawn = require('child_process').spawn; @@ -156,8 +157,7 @@ eventBus.on('invocation-done', () => { try { child.__killedByWSKDBInvocationDone = true; - child.kill(); - child.kill('SIGKILL'); + kill(child.pid); } catch (err) { console.error('Error cleaning up after activation completion', err); } @@ -180,7 +180,7 @@ // the activation that we are debugging has // finished. kill the child debugger process // - eventBus.on('invocation-done', () => child.kill()); + eventBus.on('invocation-done', () => kill(pid)); // // the child debugger process has terminated, clean things up
diff --git a/client/package.json b/client/package.json index 62dc92c..b575981 100644 --- a/client/package.json +++ b/client/package.json
@@ -22,6 +22,7 @@ "properties-parser": "^0.3.1", "request": "^2.75.0", "tmp": "0.0.29", + "tree-kill": "^1.1.0", "uuid": "^2.0.3", "ws": "^1.1.1" },