Skip to content

Commit e513169

Browse files
author
nightcityblade
committed
docs: expand run_process ctrl+c note
1 parent 3dd35d7 commit e513169

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

src/trio/_subprocess.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -664,9 +664,15 @@ async def my_deliver_cancel(process):
664664
665665
.. note:: The child process runs in the same process group as the parent
666666
Trio process, so a Ctrl+C will be delivered simultaneously to both
667-
parent and child. If you don't want this behavior, consult your
668-
platform's documentation for starting child processes in a different
669-
process group.
667+
parent and child.
668+
669+
On Unix, descendants can still change process-group or session state
670+
after startup. If a child or grandchild moves itself into a different
671+
foreground process group, then your Trio process may stop receiving
672+
Ctrl+C the way you expect. If you need isolation from terminal job
673+
control, consider starting the subprocess in a new session or process
674+
group, for example with ``start_new_session=True`` or
675+
``process_group=0``.
670676
671677
"""
672678

0 commit comments

Comments
 (0)