Skip to content

Close the host on SIGINT, SIGTERM, and SIGHUP (upstream #1734) - #1705

Closed
kblok wants to merge 7 commits into
mainfrom
fix/1677-core-signals-port
Closed

kblok wants to merge 7 commits into
mainfrom
fix/1677-core-signals-port

Conversation

@kblok

@kblok kblok commented Nov 16, 2026

Copy link
Copy Markdown
Member

Closes #1677

Ports upstream e2e-inc/e2e#1734 core/signals.ts and handleSignals: LaunchOptions.HandleSignals (default true) closes the host on SIGINT, SIGTERM, and SIGHUP, says a failed close on stderr, and lets the signal end the program unless the program listens itself. Docs, skill reference, COMPATIBILITY.md and API reference updated.

Upstream parity

Verdict: complete, with justified exceptions (follow-up #1704).

  • Ported: closeOnSignals (Core/Signals.cs), handleSignals -> HandleSignals, stderr message, the three core-signals.test.ts it (CoreSignals/CoreOnASignalTests.cs), core.mdx / reference/core.mdx content.
  • Partial test: "ends by SIGHUP though the engine listens for it..." is Partial_ends_by_SIGHUP_...; the engine-listens half needs engineListeners, which .NET cannot do (no listing of registrations). Not ported: engineListeners, upstream's re-raise (the runtime's default action ends the process). Issue Core signals: mark engine-owned signal listeners (engineListeners, upstream core/signals.ts) #1704.
  • Port-only: Signals is a .NET shape of the same file; CoreFakeEngine.OnDispose/OnEndAttempt stand for the fake engine's onDispose/onEndAttempt; the core-signals mode in E2E.Tests.App stands for the spawned program.ts. The tests return early on Windows.
  • Code review: unregistering first and the static closer set follow upstream; the unbounded close wait follows upstream too.

Tests: E2E.Core* 60 passed, CoreSignals 3 passed (net10). Not run: RealModel tests (no agent change), net11 (not installed).

Replaces #1694, which was closed unmerged; this is a fresh port from main.


Generated by Claude Code

… #1734)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls2e21jov6Swn2Aj93SnF7
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls2e21jov6Swn2Aj93SnF7
… alone, update stale docs

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls2e21jov6Swn2Aj93SnF7
… signal, mark the second signal test partial

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls2e21jov6Swn2Aj93SnF7
…o signal can be registered

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls2e22ty6x1BTtW9RcfMkd
@kblok kblok closed this Nov 16, 2026
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Core: close the host on SIGINT, SIGTERM, and SIGHUP (core-signals, upstream #1734)

2 participants