Go Home spawns interface detached

This commit is contained in:
Atlante45 2017-06-29 13:50:40 -07:00
parent ec7fe81b87
commit 22099a14a8
2 changed files with 11 additions and 8 deletions

View file

@ -334,6 +334,7 @@ function startInterface(url) {
// create a new Interface instance - Interface makes sure only one is running at a time
var pInterface = new Process('interface', interfacePath, argArray);
pInterface.detached = true;
pInterface.start();
}
@ -894,15 +895,16 @@ function onContentLoaded() {
if (dsPath && acPath) {
var dsArguments = ['--get-temp-name',
'--parent-pid', process.pid];
domainServer = new Process('domain-server', dsPath, dsArguments,
logPath, true);
domainServer = new Process('domain-server', dsPath, dsArguments, logPath);
domainServer.restartOnCrash = true;
var acArguments = ['-n7',
'--log-directory', logPath,
'--http-status-port', httpStatusPort,
'--parent-pid', process.pid];
acMonitor = new ACMonitorProcess('ac-monitor', acPath, acArguments,
httpStatusPort, logPath, true);
httpStatusPort, logPath);
acMonitor.restartOnCrash = true;
homeServer = new ProcessGroup('home', [domainServer, acMonitor]);
logWindow = new LogWindow(acMonitor, domainServer);

View file

@ -102,7 +102,7 @@ ProcessGroup.prototype = extend(ProcessGroup.prototype, {
});
var ID = 0;
function Process(name, command, commandArgs, logDirectory, restartOnCrash) {
function Process(name, command, commandArgs, logDirectory) {
events.EventEmitter.call(this);
this.id = ++ID;
@ -113,7 +113,8 @@ function Process(name, command, commandArgs, logDirectory, restartOnCrash) {
this.logDirectory = logDirectory;
this.logStdout = null;
this.logStderr = null;
this.restartOnCrash = restartOnCrash;
this.detached = false;
this.restartOnCrash = false;
this.state = ProcessStates.STOPPED;
};
@ -166,7 +167,7 @@ Process.prototype = extend(Process.prototype, {
try {
this.child = childProcess.spawn(this.command, this.commandArgs, {
detached: false,
detached: this.detached,
stdio: ['ignore', logStdout, logStderr]
});
log.debug("Spawned " + this.command + " with pid " + this.child.pid);
@ -283,8 +284,8 @@ Process.prototype = extend(Process.prototype, {
// ACMonitorProcess is an extension of Process that keeps track of the AC Montior's
// children status and log locations.
const CHECK_AC_STATUS_INTERVAL = 1000;
function ACMonitorProcess(name, path, args, httpStatusPort, logPath, restartOnCrash) {
Process.call(this, name, path, args, logPath, restartOnCrash);
function ACMonitorProcess(name, path, args, httpStatusPort, logPath) {
Process.call(this, name, path, args, logPath);
this.httpStatusPort = httpStatusPort;