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({