mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 16:23:39 +02:00
Update Process to store its log file locations
This commit is contained in:
parent
9539954b43
commit
51ee7f6ddb
1 changed files with 7 additions and 0 deletions
|
@ -107,6 +107,8 @@ function Process(name, command, commandArgs, logDirectory) {
|
|||
this.commandArgs = commandArgs ? commandArgs : [];
|
||||
this.child = null;
|
||||
this.logDirectory = logDirectory;
|
||||
this.logStdout = null;
|
||||
this.logStderr = null;
|
||||
|
||||
this.state = ProcessStates.STOPPED;
|
||||
};
|
||||
|
@ -175,6 +177,8 @@ Process.prototype = extend(Process.prototype, {
|
|||
console.log("Error renaming log file from " + tmpLogStdout + " to " + pidLogStdout, e);
|
||||
}
|
||||
});
|
||||
this.logStdout = pidLogStdout;
|
||||
fs.closeSync(logStdout);
|
||||
}
|
||||
|
||||
if (logStderr != 'ignore') {
|
||||
|
@ -184,6 +188,9 @@ Process.prototype = extend(Process.prototype, {
|
|||
console.log("Error renaming log file from " + tmpLogStdout + " to " + pidLogStdout, e);
|
||||
}
|
||||
});
|
||||
this.logStderr = pidLogStderr;
|
||||
|
||||
fs.closeSync(logStderr);
|
||||
}
|
||||
|
||||
this.child.on('error', this.onChildStartError.bind(this));
|
||||
|
|
Loading…
Reference in a new issue