Skip to content

Name uv pip install as a Foreground Launcher in Interrupts in Shell #4252

Closed

Description

@ptr727

Problem

CODESTYLE.md "Interrupts in Shell" lists launchers that may need to run in the foreground: "A launcher, such as uvx, uv run, dotnet, or xargs, may run in the foreground too. One that does not stop the tool it starts on SIGTERM must run in the foreground."

uv pip install is not named, yet it behaves the same way whenever it builds a package. That is always the case for --editable, and for any sdist. Following the "long-running external command runs in the background" bullet literally, a script backgrounds it, and SIGTERM then leaves the PEP 517 build backend running after uv exits.

Reproduction

This uses a throwaway package whose in-tree build backend writes its PID and sleeps:

uv venv -q venv
uv pip install -q --python venv/bin/python --editable ./slowpkg &
# wait for the backend to write backend.pid, then:
kill -s TERM $!; wait $!   # uv exits 143
kill -0 "$(cat backend.pid)" && echo "backend survived"

On uv 0.13.9, the backend outlived uv in the one run made.

Expected

The launcher bullet names uv pip install alongside uv run and uvx, since it builds packages through a child that SIGTERM to uv does not stop, so it runs in the foreground. uv sync builds the same way and likely belongs there too, but it was not probed.

Context

ptr727/homeassistant-purpleair#721 met this while bringing scripts/setup onto the interrupt rules. It moved its uv calls back to the foreground after the probe above.

Activity

  1. changed the title [-]Name uv pip install and uv sync as Foreground Launchers in Interrupts in Shell[/-] [+]Name uv pip install as a Foreground Launcher in Interrupts in Shell[/+] on Nov 17, 2026
  2. added a commit that references this issue on Nov 19, 2026
    03f4af0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions