Skip to content

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

@neongreen

Description

@neongreen

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions