Skip to content

docs: expand run_process Ctrl+C note#3425

Closed
nightcityblade wants to merge 1 commit intopython-trio:mainfrom
nightcityblade:fix/issue-3300
Closed

docs: expand run_process Ctrl+C note#3425
nightcityblade wants to merge 1 commit intopython-trio:mainfrom
nightcityblade:fix/issue-3300

Conversation

@nightcityblade
Copy link
Copy Markdown
Contributor

Fixes #3300

Expands the run_process docs to mention foreground/background process-group behavior on Unix and points readers to start_new_session=True and process_group=0 when they need isolation from terminal job control.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00000%. Comparing base (3dd35d7) to head (e513169).
⚠️ Report is 18 commits behind head on main.

Additional details and impacted files
@@               Coverage Diff               @@
##                 main        #3425   +/-   ##
===============================================
  Coverage   100.00000%   100.00000%           
===============================================
  Files             128          128           
  Lines           19424        19418    -6     
  Branches         1318         1318           
===============================================
- Hits            19424        19418    -6     
Files with missing lines Coverage Δ
src/trio/_subprocess.py 100.00000% <ø> (ø)

... and 9 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@A5rocks A5rocks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I don't see how this would have helped the initial issue. The only route to get the error in the issue (that I can think of) is:

  • spawn a subprocess (which is in a different process group)
  • process uses tcsetpgrp on that new process group

Or alternatively, a subprocess does a similar dance. This documentation... doesn't really help. Honestly I'm not sure what would help with the issue.

Anyways, it seems you have been opening too many PRs recently... 68 in the last 2 weeks! Unfortunately I think the open issues on Trio need a bunch of thought to how to solve them, so I'm going to close this. Feel free to reopen it whenever you've slowed down how many PRs you make!

@A5rocks A5rocks closed this Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

run_process: Document pitfalls re/ Ctrl+C and not creating a new process group

2 participants