Skip to content

--install still waits in $(…) where a SIGINT can be lost: mode_is's find, the dirname of each mkdir -p in place_skill_and_hook, and pipx_link_match's link_venv #318

Open

Description

@brettheap

What happens

--install takes some answers through $(…). Bash waits for a command substitution's child outside its job table. A SIGINT that bash takes there, after the child has closed its output and when the child does not itself die of the signal, is lost: the INT trap does not run and the install goes on.

The fix for #250 (branch fix/install-sigint-leaves-no-temporary-250, not yet landed) traps SIGINT in workdir and takes place_by_rename's answers (dirname, mktemp and both owner_of calls) through a file in $WORKDIR, which is a wait bash does handle. Its comment names what it leaves: "every other $(…) can still lose one, mode_is's find and the dirname of each mkdir -p in place_skill_and_hook among them" (openRepoTools:267-277 at 14695e1). The fix for #257 (branch fix/install-rechecks-pipx-link-at-placement-257, not yet landed) adds one more to the placement loop.

Where. Line numbers are at 14695e1 (the head of #250's branch when this was filed) unless a commit is named.

When it is lost (bash 5.2.21; the installer's INT trap text over a 2 s wait, SIGINT at 0.6 s; the light check's probes, re-run)

The wait SIGINT to the shell alone SIGINT to the process group, child ignores it SIGINT to the process group, child dies of it
a plain command trap runs trap runs trap runs
$(…), child has closed its output and lingers LOST: exit 0, the script goes on LOST trap runs
$(…), pipe still open trap runs after the wait trap runs after the wait trap runs after the wait

So a Ctrl-C, which is a group signal, is lost only where the child cannot die of it. For the real find, dirname and link_venv that is the instant between the child closing its output and bash reaping it, which is the instant #250's mode 1 describes ("after mktemp has exited 0, but before bash has reaped it"). For a plain command the INT trap now runs there; for a $(…) it does not. That reading is not measured with the real tools. A signal sent to the shell alone, as the #250 branch's dirname stand-in does, is lost every time. The comment at :272-274 ("lost, trapped or not") is true of that window and not of every SIGINT that lands in a $(…).

Why it matters

Low. A swallowed Ctrl-C does nothing at that instant and the install goes on until a second one; a lost SIGINT does not itself leave anything behind. It is the fault #250's fix closes for place_by_rename, left in the places #250 names, and a test that lands a SIGINT at one of them would flake as #250's did.

What a fix has to settle (nothing here is decided)

Not run: the real installer under a real Ctrl-C at these waits. The probes use sh stand-ins, not find or link_venv. Not audited: every other $(…) reachable from install_commands. The list above is what the reviews named, plus the two hook_write_settings waits that a grep found.

Found by: the independent re-review of #250 (SHOULD 2 and N1, 2026-10-22) and the light check of #250's 14695e1 and #257's 93ab282 (part A, 2026-10-22). Filed on Brett Heap's word of 2026-10-23T14:21:33Z, by multiple choice: "Lost-SIGINT waits".

Lane: openRepoTools-5

Activity

  1. brettheap commented on Oct 24, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoTools-5, session 0d83dca2-c18c-4bb0-99ce-896e6cafea02@Eagle, 2026-10-24T14:17:44Z, for #318

    Logged in lanes/log/openRepoTools-5.md at 0dd035bca8366ad15d29c94708e16ea60f43b8c4.

    The three reads (lane-collision-protocol Rule 1):

    1. existing `CLAIMED —` comments on opensoft/openRepoTools#318:
       none
    2. `gh pr list --repo opensoft/openRepoTools --state all --search "#318"`, kept where the row or its body names `#318`:
       none
    3. `git ls-remote --heads [email protected]:opensoft/openRepoTools` branches naming `318` as a whole token:
       none
    
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