From 9ea081deb3d1e7333e158b1af40aed832b16e0d4 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Sun, 31 Aug 2014 16:13:05 -0400 Subject: [PATCH] sending 'bind' message to child proc instead of SIGCONT signal, which is not understood by Windows installs --- app.js | 6 +++++- loader.js | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index bd9cb02e0a..9c836d2c44 100644 --- a/app.js +++ b/app.js @@ -143,7 +143,11 @@ function start() { plugins.ready(function() { webserver.init(function() { // If this callback is called, this means that loader.js is used - process.on('SIGCONT', webserver.listen); + process.on('message', function(msg) { + if (msg === 'bind') { + webserver.listen(); + } + }); process.send({ action: 'ready' }); diff --git a/loader.js b/loader.js index a3ce275704..48d4929238 100644 --- a/loader.js +++ b/loader.js @@ -29,7 +29,7 @@ var nconf = require('nconf'), if (message && typeof message === 'object' && message.action) { switch (message.action) { case 'ready': - if (!callback) return nbb.kill('SIGCONT'); + if (!callback) return nbb.send('bind'); callback(); break; case 'restart': @@ -63,7 +63,7 @@ var nconf = require('nconf'), nbb_restart = function() { nbb_start(function() { nbbOld.removeAllListeners('exit').on('exit', function() { - nbb.kill('SIGCONT'); + nbb.send('bind'); }); nbbOld.kill(); });