Commit 1a58fd5
Always call WaitForExit() (no args) before Dispose() in DisposeProcess
The previous fix only called WaitForExit() in the else branch (process
already exited). But when the process is still running, KillTree is
called which uses either Kill+WaitForExit(int) or returns early if the
process already exited - neither of which guarantees ErrorDataReceived
event dispatch. Move WaitForExit() (no args) to be unconditional after
the if/else block so it always runs before Dispose().
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>1 parent 0a6158f commit 1a58fd5
1 file changed
Lines changed: 5 additions & 7 deletions
Lines changed: 5 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
237 | 235 | | |
238 | 236 | | |
239 | 237 | | |
| |||
0 commit comments