Commit bc10e41
Add timeout to WaitForExitAsync in GetUnexpectedExitExceptionAsync
When CleanupAsync is entered from ReadMessagesAsync (stdout EOF), the
cancellation token is _shutdownCts.Token which hasn't been canceled yet
(base.CleanupAsync runs later). If stderr EOF hasn't been delivered by
the threadpool yet, WaitForExitAsync hangs indefinitely.
Use a linked CTS with ShutdownTimeout to bound the wait. The process is
already dead; we're just draining stderr pipe buffers.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 8ad61e5 commit bc10e41
1 file changed
Lines changed: 7 additions & 1 deletion
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
102 | 106 | | |
103 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
104 | 110 | | |
105 | 111 | | |
106 | 112 | | |
| |||
0 commit comments