Skip to content

fix: Ctrl+C now exits cleanly via os.Exit(0) - #2140

Merged
Seanstoppable merged 1 commit into
wtfutil:trunkfrom
Seanstoppable:seanstoppable-fix-ctrl-c-exit
Jul 26, 2026
Merged

Seanstoppable merged 1 commit into
wtfutil:trunkfrom
Seanstoppable:seanstoppable-fix-ctrl-c-exit

Conversation

@Seanstoppable

Copy link
Copy Markdown
Collaborator

Problem

Pressing Ctrl+C to exit the app would stop the tview event loop but leave the process hanging. Background goroutines (widget refresh schedules, config file watcher, HTTP calls) kept the process alive indefinitely.

Fix

Replace the inline stop logic in the Ctrl+C handler with a call to wtfApp.Exit(), which calls os.Exit(0) after cleanup — matching the behavior of the q quit key.

The Ctrl+C handler called TViewApp.Stop() but didn't call os.Exit(0),
so background goroutines (widget refresh schedules, config watcher, etc.)
kept the process alive. Now uses wtfApp.Exit() which terminates the
process, matching the behavior of the 'q' quit key.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@Seanstoppable
Seanstoppable merged commit 35f1c5b into wtfutil:trunk Jul 26, 2026
4 checks passed
@Seanstoppable
Seanstoppable deleted the seanstoppable-fix-ctrl-c-exit branch July 26, 2026 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

⌂ 换网址