From f68f4448d856bca319412a1bf751a59e63d1f07d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20Unneb=C3=A4ck?= Date: Wed, 8 Mar 2017 16:30:59 +0100 Subject: [PATCH] Always start the deamon using node --- lib/Client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Client.js b/lib/Client.js index 6aa0209a..71c49281 100644 --- a/lib/Client.js +++ b/lib/Client.js @@ -223,7 +223,7 @@ Client.prototype.launchDaemon = function(opts, cb) { Common.printOut(that.conf.PREFIX_MSG + 'Spawning PM2 daemon with pm2_home=' + this.pm2_home); - var child = require('child_process').spawn(process.execPath || 'node', node_args, { + var child = require('child_process').spawn('node', node_args, { detached : true, cwd : that.conf.cwd || process.cwd(), env : util._extend({