Commit 1826e6b
Guard WaitForExit() with HasExited check to avoid hanging if kill times out
If KillTree's kill succeeds but WaitForExit(int) times out, the process
is still alive. Calling WaitForExit() (no args) unconditionally would
then block indefinitely. Guard with HasExited to only flush stderr
events when we know the process has actually exited.
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>1 parent 1a58fd5 commit 1826e6b
1 file changed
Lines changed: 6 additions & 2 deletions
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
234 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
235 | 239 | | |
236 | 240 | | |
237 | 241 | | |
| |||
0 commit comments