From c2baf66afc94bb139ec13f984afc42a771bbb6bb Mon Sep 17 00:00:00 2001 From: indexzero Date: Sun, 8 Jul 2012 18:15:12 -0400 Subject: [PATCH] [minor] Prefer no spaces when declaring Array instances --- lib/forever.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/forever.js b/lib/forever.js index e9518f8e..a879ad4b 100644 --- a/lib/forever.js +++ b/lib/forever.js @@ -392,13 +392,15 @@ forever.startDaemon = function (script, options) { errFD = fs.openSync(options.logFile, 'a'); monitorPath = path.resolve(__dirname, '..', 'bin', 'monitor'); - monitor = spawn(process.execPath, [ monitorPath, script ], { - stdio: [ 'ipc', outFD, errFD ], + monitor = spawn(process.execPath, [monitorPath, script], { + stdio: ['ipc', outFD, errFD], detached: true }); + monitor.on('exit', function (code) { console.error('Monitor died unexpectedly with exit code %d', code); }); + monitor.send(JSON.stringify(options)); monitor.unref(); };