Skip to content

Re-Raise the Signal After Cleanup Instead of Exiting 130 or 143 #4084

Closed

Description

@ptr727

Decision

Answered by the maintainer, 2026-11-11. After its cleanup, a script that receives SIGINT or SIGTERM re-raises the signal, rather than exiting with a plain status 130 or 143.

#3947's rule, merged in #4078, has a script exit 130 on SIGINT and 143 on SIGTERM. But a process that calls exit 130 has not died by the signal. So a calling bash loop reads Ctrl-C as an ordinary non-zero exit and runs its next iteration rather than stopping. Re-raising keeps the status a shell reports, 130 or 143, and also makes the signal death visible to the caller.

Done when

  • CODESTYLE.md "Interrupts" states the re-raise.
  • The Python mechanics restore the default handler for the signal and re-send it to the process after cleanup.
  • The Shell mechanics clear the trap for the signal and kill -s the script's own process with it after cleanup.
  • The python-codestyle and shell-codestyle skills are regenerated through scripts/build_dist.py. python-codestyle's description is at its 1024-character cap, so it must not grow.
  • A constructed probe shows a calling bash loop stopping on the signal.
  • The rest of Require Orderly SIGINT and SIGTERM Handling in Shell and Python Scripts #4078's mechanics stand. The maintainer confirmed their level of detail on 2026-11-11.

Activity

  1. added
    enhancement
    on Nov 11, 2026
  2. ptr727 commented on Nov 13, 2026

    @ptr727
    OwnerAuthor

    Backlog burndown claim, round 1 (2026-11-13), away run, scope develop. Branch burndown/interrupts-reraise, group: #4084, #4097. Tier: frontier (carried CODESTYLE.md and codestyle skills).

    Predicted files:

    • CODESTYLE.md ("Interrupts", "Interrupts in Python", "Interrupts in Shell")
    • .agents/skills/python-codestyle/SKILL.md
    • .agents/skills/shell-codestyle/SKILL.md
    • .github/skills/python-codestyle/SKILL.md
    • .github/skills/shell-codestyle/SKILL.md
    • .claude-plugin/fleet-skills/skills/python-codestyle/SKILL.md
    • .claude-plugin/fleet-skills/skills/shell-codestyle/SKILL.md
    • .claude-plugin/fleet-skills/.source-digests/python-codestyle
    • .claude-plugin/fleet-skills/.source-digests/shell-codestyle
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions