Commit 891c34c
Only call WaitForExit() when process exited on its own, not after KillTree
The previous fix called WaitForExit() unconditionally or guarded only by
HasExited, which could hang on Windows when KillTree left child processes
holding output handles. Now WaitForExit() is only called when the process
exited before DisposeProcess was called (!processRunning), meaning KillTree
was not invoked. In that case, no child processes hold handles and
WaitForExit() completes quickly.
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>1 parent 1826e6b commit 891c34c
1 file changed
+6
-3
lines changedLines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
234 | | - | |
235 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
236 | 239 | | |
237 | 240 | | |
238 | 241 | | |
| |||
0 commit comments