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:
maj00r
2026-10-04 13:38:29 +02:00
parent 04f6a4cc8d
commit 59798e41fa
12 changed files with 316 additions and 13 deletions

View File

@@ -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);