[PR #383] [MERGED] feat: add configurable exit signals for process termination #1281

Closed
opened 2026-03-14 09:28:13 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/383
Author: @msmps
Created: 12/4/2025
Status: Merged
Merged: 12/5/2025
Merged by: @kommander

Base: mainHead: fix/lifecycle-20251203160237


📝 Commits (1)

  • b9d75c3 feat: add configurable exit signals for process termination

📊 Changes

1 file changed (+29 additions, -9 deletions)

View changed files

📝 packages/core/src/renderer.ts (+29 -9)

📄 Description

Description

  • Adds new exitSignals option to renderer, which specifies a list of signals that the renderer should destroy itself upon receiving.
    • The listeners are mounted when the renderer is created or resumed, and are unmounted when the renderer is suspended.
  • The exit handler is now run on the beforeExit event. The exit event does not allow for more tasks to be added to the event loop, and thus the Bun.sleep(200) call would be effectively ignored, preventing the captured logs from being dumped.
  • Applies some changes from #302

Misc


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opentui/pull/383 **Author:** [@msmps](https://github.com/msmps) **Created:** 12/4/2025 **Status:** ✅ Merged **Merged:** 12/5/2025 **Merged by:** [@kommander](https://github.com/kommander) **Base:** `main` ← **Head:** `fix/lifecycle-20251203160237` --- ### 📝 Commits (1) - [`b9d75c3`](https://github.com/anomalyco/opentui/commit/b9d75c3d9820089e7557698c74e10d9ebfb5dc07) feat: add configurable exit signals for process termination ### 📊 Changes **1 file changed** (+29 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/renderer.ts` (+29 -9) </details> ### 📄 Description ## Description - Adds new `exitSignals` option to renderer, which specifies a list of signals that the renderer should destroy itself upon receiving. - The listeners are mounted when the renderer is created or resumed, and are unmounted when the renderer is suspended. - The exit handler is now run on the `beforeExit` event. The `exit` event does not allow for more tasks to be added to the event loop, and thus the `Bun.sleep(200)` call would be effectively ignored, preventing the captured logs from being dumped. - Applies some changes from #302 ## Misc - closes #248 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 09:28:13 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#1281
No description provided.