Commit 2aee615
committed
Fix popen cleanup in git file finder to prevent gc errors
- Add proper proc.wait() call in finally block to ensure process is reaped
- Add timeout and fallback to proc.kill() to prevent hanging
- This should resolve gc errors with popen objects in test_case_cwd_evil[git] on Windows
The previous code only called proc.wait() in the exception handler, leaving
processes unreleased in the normal flow, which could cause gc warnings about
unclosed subprocess popen objects.1 parent 6fb72b7 commit 2aee615
1 file changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
87 | 94 | | |
88 | | - | |
| 95 | + | |
| 96 | + | |
89 | 97 | | |
90 | 98 | | |
91 | 99 | | |
| |||
0 commit comments