python-trio / python-trio/trio
run_process: Document pitfalls re/ Ctrl+C and not creating a new process group
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.3k
- Forks
- 431
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 6
Description
I know the docs already mention process groups;
However, I had no idea about the existence of background and foreground groups, and didn't know that a grandchild process could take control of Ctrl+C handling if it becomes a foreground process and pushes my process into background (?). So I spent quite a lot of time trying to figure out why Ctrl+C wasn't reaching my process at all.
#3273 is relevant, but even for non-shell invocations of run_process it's still possible to lose control over Ctrl+C unless you use smth like "start_new_session".
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing process-group documentation for run_process and issue #3273. Document the foreground/background process-group and Ctrl+C pitfalls, including how a non-shell invocation can lose signal control and the relevance of start_new_session; done when these cases are clearly explained.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100