Skip to content

fix: preserve host signal handlers on shutdown - #219

Open
obckelbley wants to merge 1 commit into
sidequestjs:masterfrom
obckelbley:codex/preserve-host-signal-handlers
Open

obckelbley wants to merge 1 commit into
sidequestjs:masterfrom
obckelbley:codex/preserve-host-signal-handlers

Conversation

@obckelbley

Copy link
Copy Markdown
Contributor

Summary

  • track the SIGINT and SIGTERM handlers installed by Sidequest
  • remove only those handlers during engine cleanup
  • preserve signal handlers owned by the host application, including when Sidequest graceful shutdown is disabled

Why

Engine.close() always calls clearGracefulShutdown(). That function currently uses process.removeAllListeners() for SIGINT and SIGTERM, so stopping Sidequest can silently delete unrelated application shutdown handlers. The same happens when gracefulShutdown is false and Sidequest did not install any handlers itself.

Validation

  • corepack yarn workspace @sidequest/engine test:ci
  • corepack yarn lint
  • corepack yarn format:check
  • corepack yarn workspace @sidequest/engine build

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.

1 participant