Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Monitor.prototype.start = function (fn) {
var start = ForeverMonitor.prototype.start
, monitor = this
, restarting = arguments[0] === true
, startCallback = this.startCallback;
if(typeof fn === 'function') {
startCallback = this.startCallback = fn;
start.call(this);
} else {
start.apply(this, arguments);
}
if(!(this.child.stdout && this.child.stderr)) {
this.child.stdout = process.stdout;
this.child.stderr = process.stderr;
}