Ограничить завершение Git-процессов после timeout на Windows - #27
Open
APonkratov wants to merge 3 commits into
Open
Ограничить завершение Git-процессов после timeout на Windows#27APonkratov wants to merge 3 commits into
APonkratov wants to merge 3 commits into
Conversation
APonkratov
marked this pull request as ready for review
August 12, 2026 16:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Что изменено
run_git(args, timeout)на базеPopenсDEVNULLдля stdin и UTF-8/errors="replace"для stdout/stderr.taskkill.exe /T /Fс отдельным лимитом; затем применяется fallback к непосредственному процессу, а drain pipe и ожидание тоже ограничены.bsl_index.pyпереведены на общий runner без изменения существующей семантики fallback.taskkill.uv.lock.BUILDER_VERSIONостаётся 14 — пересборка индекса не требуется.Почему
Git for Windows запускает дочерний
mingw64\bin\git.exeизGit\cmd\git.exe. Прежнийsubprocess.run(..., capture_output=True, timeout=...)при timeout завершал только непосредственный процесс, после чего мог бессрочно ждать закрытия stdout/stderr: дочерний Git сохранял pipe-хэндлы открытыми. Из-за этогоrlm_start, обновление индекса илиgit_searchмогли не вернуть управление уже после истечения лимита.Closes #26
Тип изменения
Чеклист
uv run pytest tests/ -q: 2567 passed, 5 skipped, 1 xfailed)uv run ruff check .)uv lock --check)