Skip to content

fix(interceptors): relay SIGTERM and SIGHUP to the wrapped command - #113

Open
moise10r wants to merge 2 commits into
mainfrom
fix/17-sigterm-and-sighup-are-not-forwarded
Open

moise10r wants to merge 2 commits into
mainfrom
fix/17-sigterm-and-sighup-are-not-forwarded

Conversation

@moise10r

@moise10r moise10r commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

What this changes

Stopping a wrapper left the real command running. memnox-shell and memnox-intercept now forward SIGTERM and SIGHUP to the command and stop listening once it exits. memnox-intercept exits 143 or 129 rather than 1. The shared helpers live in a new child-signals.ts.

How it was verified

packages/interceptors/test/child-signals.test.ts sends SIGTERM and SIGHUP to a real sleep 30 through an injected source. It checks the exit code, that the process is gone and that the listeners are removed. The test exercises the shared helper rather than the built binaries.

Fixes #17

Checklist

  • pnpm format && pnpm typecheck && pnpm test && pnpm deadcode all pass
  • Behaviour change ships with a test
  • No any, no magic values, no console.* outside cli-output.ts
  • If this touches the decision path: still deterministic — no LLM, network, or randomness
  • If this changes a verb table: the classes that moved are named above (not applicable)
  • If this changes a command, flag or file it writes: docs/ says so (not applicable)

This branch has not been deployed

No deployments
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.

interceptors: SIGTERM and SIGHUP are not forwarded, so the real command outlives its wrapper

1 participant