Skip to content

Avoid forced process exit on shutdown#147

Open
x-Spartacus wants to merge 1 commit into
tickernelz:mainfrom
x-Spartacus:fix/shutdown-without-process-exit
Open

Avoid forced process exit on shutdown#147
x-Spartacus wants to merge 1 commit into
tickernelz:mainfrom
x-Spartacus:fix/shutdown-without-process-exit

Conversation

@x-Spartacus

Copy link
Copy Markdown
Collaborator

Closes #114

  • Remove process.exit() calls from the SIGINT/SIGTERM shutdown handler
  • Preserve cleanup and error logging
  • Clear pending idle auto-capture timeout during cleanup
  • Set process.exitCode = 1 on cleanup failure without forcing host process teardown
  • Add regression coverage so process.exit() is not reintroduced

Tested:

  • npx bun test tests/plugin-shutdown.test.ts tests/plugin-loader-contract.test.ts
  • npx bun run typecheck
  • npx bun run build
  • npx bun test

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.

[Bug] Bun NAPI crash on TUI exit: process.exit() in SIGINT handler conflicts with onnxruntime-node native cleanup

1 participant