sending 'bind' message to child proc instead of SIGCONT signal, which is not understood by Windows installs

v1.18.x
Julian Lam 11 years ago
parent 14fcd36134
commit 9ea081deb3

@ -143,7 +143,11 @@ function start() {
plugins.ready(function() { plugins.ready(function() {
webserver.init(function() { webserver.init(function() {
// If this callback is called, this means that loader.js is used // 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({ process.send({
action: 'ready' action: 'ready'
}); });

@ -29,7 +29,7 @@ var nconf = require('nconf'),
if (message && typeof message === 'object' && message.action) { if (message && typeof message === 'object' && message.action) {
switch (message.action) { switch (message.action) {
case 'ready': case 'ready':
if (!callback) return nbb.kill('SIGCONT'); if (!callback) return nbb.send('bind');
callback(); callback();
break; break;
case 'restart': case 'restart':
@ -63,7 +63,7 @@ var nconf = require('nconf'),
nbb_restart = function() { nbb_restart = function() {
nbb_start(function() { nbb_start(function() {
nbbOld.removeAllListeners('exit').on('exit', function() { nbbOld.removeAllListeners('exit').on('exit', function() {
nbb.kill('SIGCONT'); nbb.send('bind');
}); });
nbbOld.kill(); nbbOld.kill();
}); });

Loading…
Cancel
Save