diff --git a/lib/plugins/repl.js b/lib/plugins/repl.js index 8389783..b1a4561 100644 --- a/lib/plugins/repl.js +++ b/lib/plugins/repl.js @@ -37,7 +37,7 @@ exports = module.exports = function(){ var server , sockets = []; - + master.dynState = []; // start repl function start(){ // TCP or unix-domain socket repl @@ -164,6 +164,7 @@ define('pids', function(master, sock){ define('kill', function(master, sock, id, signal){ var worker = master.children[id]; if (worker) { + master.dynState.push[id]; worker.proc.kill(signal); sock.write('sent \033[36m' + (signal || 'SIGTERM') + '\033[0m to worker #' + id + '\n'); } else { diff --git a/lib/plugins/stats.js b/lib/plugins/stats.js index 5b570c9..d49f8ec 100644 --- a/lib/plugins/stats.js +++ b/lib/plugins/stats.js @@ -208,11 +208,22 @@ repl.define('stats', function(master, sock){ master.children.forEach(function(worker){ var stats = '' + ,status = "alive"; , piped = []; + if (master.dynState) { + for(var i=0, max=master.dynstate.length; i