Skip to content

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

Closed
kblok wants to merge 1 commit into
mainfrom
fix/1677-signals-host-close
Closed

kblok wants to merge 1 commit into
mainfrom
fix/1677-signals-host-close

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

…gnals (upstream #1734, core-signals)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls2e22fBdoqJfvqHrkan68
@coderabbitai

coderabbitai Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between f0f6eeb and 50d8f14.

Files selected for processing: 11

  • COMPATIBILITY.md
  • docs-site/src/content/docs/api/E2E/LaunchOptions.md
  • docs-site/src/content/docs/docs/core.mdx
  • skills/e2e-dotnet/SKILL.md
  • skills/e2e-dotnet/references/host.md
  • src/E2E/Core/Launch.cs
  • src/E2E/Core/Signals.cs
  • tests/E2E.Tests.App/E2E.Tests.App.csproj
  • tests/E2E.Tests.App/Program.cs
  • tests/E2E.Tests/Core/CoreFakeEngine.cs
  • tests/E2E.Tests/CoreSignals/CoreOnASignalTests.cs
  • 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

@kblok kblok closed this Nov 16, 2026
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