Skip to content

Commit

Permalink
[api] Expose options passed to child_process.spawn
Browse files Browse the repository at this point in the history
  • Loading branch information
indexzero committed Feb 16, 2011
1 parent 4b25241 commit 6862ad5
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions lib/forever/monitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,19 @@ var sys = require('sys'),
var Monitor = exports.Monitor = function (script, options) {
events.EventEmitter.call(this);

this.silent = options.silent || false;
this.forever = options.forever || false;
this.command = options.command || 'node';
this.sourceDir = options.sourceDir;
this.options = options.options || [];
this.max = options.max;
this.logFile = options.logFile;
this.pidFile = options.pidFile;
this.outFile = options.outFile;
this.errFile = options.errFile;
this.logger = options.logger || new (winston.Logger)({
transports: [new winston.transports.Console()]
this.silent = options.silent || false;
this.forever = options.forever || false;
this.command = options.command || 'node';
this.sourceDir = options.sourceDir;
this.options = options.options || [];
this.spawnWith = options.spawnWith || null;
this.max = options.max;
this.logFile = options.logFile;
this.pidFile = options.pidFile;
this.outFile = options.outFile;
this.errFile = options.errFile;
this.logger = options.logger || new (winston.Logger)({
transports: [new winston.transports.Console({ silent: this.silent })]
});

// Extend from the winston logger.
Expand Down Expand Up @@ -161,8 +162,8 @@ Monitor.prototype.trySpawn = function () {
return false;
}
}
return spawn(this.command, this.options);

return spawn(this.command, this.options, this.spawnWith);
};

//
Expand Down

0 comments on commit 6862ad5

Please sign in to comment.