mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
add pack PM2_NODE_OPTIONS && fix harmony test
This commit is contained in:
parent
6455d7eafa
commit
840d760fd7
@ -230,11 +230,17 @@ Satan.launchDaemon = function launchDaemon(cb) {
|
||||
var SatanJS = p.resolve(p.dirname(module.filename), 'Satan.js');
|
||||
var InteractorDaemonizer = require('./Interactor/InteractorDaemonizer.js');
|
||||
|
||||
var node_args = [];
|
||||
|
||||
var out = fs.openSync(cst.PM2_LOG_FILE_PATH, 'a'),
|
||||
err = fs.openSync(cst.PM2_LOG_FILE_PATH, 'a');
|
||||
|
||||
var child = require('child_process').spawn('node', [SatanJS], {
|
||||
if (process.env.PM2_NODE_OPTIONS)
|
||||
node_args = node_args.concat(process.env.PM2_NODE_OPTIONS.split(' '));
|
||||
|
||||
node_args.push(SatanJS);
|
||||
|
||||
var child = require('child_process').spawn('node', node_args, {
|
||||
detached : true,
|
||||
cwd : process.cwd(),
|
||||
env : util._extend({
|
||||
|
||||
@ -16,15 +16,13 @@ $pm2 list
|
||||
$pm2 kill
|
||||
|
||||
PM2_NODE_OPTIONS='--harmony' `pwd`/../../bin/pm2 start harmony.js
|
||||
sleep 2
|
||||
should 'should not fail when passing harmony option to V8' 'errored' 0
|
||||
sleep 4
|
||||
$pm2 list
|
||||
should 'should not fail when passing harmony option to V8' 'restart_time: 0' 1
|
||||
$pm2 kill
|
||||
|
||||
|
||||
$pm2 start harmony.js --node-args="--harmony"
|
||||
sleep 8
|
||||
$pm2 list
|
||||
should 'should not fail when passing node-args=harmony opts' 'errored' 0
|
||||
$pm2 list
|
||||
$pm2 kill
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user