mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 14:47:41 +02:00
Go Home spawns interface detached
This commit is contained in:
parent
ec7fe81b87
commit
22099a14a8
2 changed files with 11 additions and 8 deletions
|
@ -334,6 +334,7 @@ function startInterface(url) {
|
||||||
|
|
||||||
// create a new Interface instance - Interface makes sure only one is running at a time
|
// create a new Interface instance - Interface makes sure only one is running at a time
|
||||||
var pInterface = new Process('interface', interfacePath, argArray);
|
var pInterface = new Process('interface', interfacePath, argArray);
|
||||||
|
pInterface.detached = true;
|
||||||
pInterface.start();
|
pInterface.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -894,15 +895,16 @@ function onContentLoaded() {
|
||||||
if (dsPath && acPath) {
|
if (dsPath && acPath) {
|
||||||
var dsArguments = ['--get-temp-name',
|
var dsArguments = ['--get-temp-name',
|
||||||
'--parent-pid', process.pid];
|
'--parent-pid', process.pid];
|
||||||
domainServer = new Process('domain-server', dsPath, dsArguments,
|
domainServer = new Process('domain-server', dsPath, dsArguments, logPath);
|
||||||
logPath, true);
|
domainServer.restartOnCrash = true;
|
||||||
|
|
||||||
var acArguments = ['-n7',
|
var acArguments = ['-n7',
|
||||||
'--log-directory', logPath,
|
'--log-directory', logPath,
|
||||||
'--http-status-port', httpStatusPort,
|
'--http-status-port', httpStatusPort,
|
||||||
'--parent-pid', process.pid];
|
'--parent-pid', process.pid];
|
||||||
acMonitor = new ACMonitorProcess('ac-monitor', acPath, acArguments,
|
acMonitor = new ACMonitorProcess('ac-monitor', acPath, acArguments,
|
||||||
httpStatusPort, logPath, true);
|
httpStatusPort, logPath);
|
||||||
|
acMonitor.restartOnCrash = true;
|
||||||
|
|
||||||
homeServer = new ProcessGroup('home', [domainServer, acMonitor]);
|
homeServer = new ProcessGroup('home', [domainServer, acMonitor]);
|
||||||
logWindow = new LogWindow(acMonitor, domainServer);
|
logWindow = new LogWindow(acMonitor, domainServer);
|
||||||
|
|
|
@ -102,7 +102,7 @@ ProcessGroup.prototype = extend(ProcessGroup.prototype, {
|
||||||
});
|
});
|
||||||
|
|
||||||
var ID = 0;
|
var ID = 0;
|
||||||
function Process(name, command, commandArgs, logDirectory, restartOnCrash) {
|
function Process(name, command, commandArgs, logDirectory) {
|
||||||
events.EventEmitter.call(this);
|
events.EventEmitter.call(this);
|
||||||
|
|
||||||
this.id = ++ID;
|
this.id = ++ID;
|
||||||
|
@ -113,7 +113,8 @@ function Process(name, command, commandArgs, logDirectory, restartOnCrash) {
|
||||||
this.logDirectory = logDirectory;
|
this.logDirectory = logDirectory;
|
||||||
this.logStdout = null;
|
this.logStdout = null;
|
||||||
this.logStderr = null;
|
this.logStderr = null;
|
||||||
this.restartOnCrash = restartOnCrash;
|
this.detached = false;
|
||||||
|
this.restartOnCrash = false;
|
||||||
|
|
||||||
this.state = ProcessStates.STOPPED;
|
this.state = ProcessStates.STOPPED;
|
||||||
};
|
};
|
||||||
|
@ -166,7 +167,7 @@ Process.prototype = extend(Process.prototype, {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.child = childProcess.spawn(this.command, this.commandArgs, {
|
this.child = childProcess.spawn(this.command, this.commandArgs, {
|
||||||
detached: false,
|
detached: this.detached,
|
||||||
stdio: ['ignore', logStdout, logStderr]
|
stdio: ['ignore', logStdout, logStderr]
|
||||||
});
|
});
|
||||||
log.debug("Spawned " + this.command + " with pid " + this.child.pid);
|
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
|
// ACMonitorProcess is an extension of Process that keeps track of the AC Montior's
|
||||||
// children status and log locations.
|
// children status and log locations.
|
||||||
const CHECK_AC_STATUS_INTERVAL = 1000;
|
const CHECK_AC_STATUS_INTERVAL = 1000;
|
||||||
function ACMonitorProcess(name, path, args, httpStatusPort, logPath, restartOnCrash) {
|
function ACMonitorProcess(name, path, args, httpStatusPort, logPath) {
|
||||||
Process.call(this, name, path, args, logPath, restartOnCrash);
|
Process.call(this, name, path, args, logPath);
|
||||||
|
|
||||||
this.httpStatusPort = httpStatusPort;
|
this.httpStatusPort = httpStatusPort;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue