mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-10-31 12:09:06 +01:00
Report a simulator that crashes or closes right after the start
The exit code, read with its signal or NTSTATUS, and the last lines of the error stream - or of log.txt when it stayed silent. The stream is captured only while the starter stays to read it.
This commit is contained in:
@@ -8,13 +8,24 @@ public interface IProcessHandle
|
||||
{
|
||||
bool HasExited { get; }
|
||||
|
||||
/// <summary>Once it has ended; null while running, or for a process the starter did not start.</summary>
|
||||
int? ExitCode { get; }
|
||||
|
||||
/// <summary>The last lines of the error stream, when it was captured.</summary>
|
||||
IReadOnlyList<string> ErrorTail { get; }
|
||||
|
||||
Task WaitForExitAsync(CancellationToken cancellationToken = default);
|
||||
}
|
||||
|
||||
public interface IProcessLauncher
|
||||
{
|
||||
/// <summary>
|
||||
/// Starts a process. With captureErrors its error stream is kept for the
|
||||
/// handle - only for a process the starter outlives: a write to a pipe nobody
|
||||
/// reads any more can kill the writer.
|
||||
/// </summary>
|
||||
IProcessHandle? Start(string executablePath, IReadOnlyList<string> arguments, string? workingDirectory,
|
||||
out string? error);
|
||||
bool captureErrors, out string? error);
|
||||
|
||||
bool OpenInShell(string pathOrUrl);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user