Improve run_process defaults if there's a shell#3273
Open
A5rocks wants to merge 3 commits intopython-trio:mainfrom
Open
Improve run_process defaults if there's a shell#3273A5rocks wants to merge 3 commits intopython-trio:mainfrom
run_process defaults if there's a shell#3273A5rocks wants to merge 3 commits intopython-trio:mainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3273 +/- ##
====================================================
- Coverage 100.00000% 99.99486% -0.00514%
====================================================
Files 128 128
Lines 19414 19473 +59
Branches 1318 1327 +9
====================================================
+ Hits 19414 19472 +58
- Partials 0 1 +1
🚀 New features to boost your workflow:
|
A5rocks
commented
May 25, 2025
18e65e8 to
165b103
Compare
- `shell=True` implies `process_group=0` - make default `deliver_cancel` aware of process groups - backport `process_group` to Pythons prior to 3.11
165b103 to
60ecb14
Compare
J2085isa
approved these changes
Jan 15, 2026
J2085isa
approved these changes
Jan 15, 2026
J2085isa
approved these changes
Jan 15, 2026
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.
Fixes #3237
If
shell=True, then it's possible that things we spawn will themselves spawn things. This is a problem because we only kill the parent process and those don't automatically propagate signals. We can solve this by default by making sure shell processes get their own process group which we subsequently kill.