We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd1efaf commit c564746Copy full SHA for c564746
src/Asynkron.TestRunner.Worker/Program.cs
@@ -15,6 +15,26 @@
15
cts.Cancel();
16
};
17
18
+// Monitor parent process - exit if stdin closes (parent died)
19
+_ = Task.Run(async () =>
20
+{
21
+ try
22
+ {
23
+ while (!cts.IsCancellationRequested)
24
25
+ // Peek at stdin - if parent died, this returns -1 immediately
26
+ var peek = Console.In.Peek();
27
+ if (peek == -1 && Console.IsInputRedirected)
28
29
+ // Parent died, exit immediately
30
+ Environment.Exit(0);
31
+ }
32
+ await Task.Delay(500, cts.Token);
33
34
35
+ catch { /* ignore */ }
36
+});
37
+
38
await RunWorkerAsync(Console.In, Console.Out, frameworks, cts.Token);
39
40
static async Task RunWorkerAsync(
0 commit comments