Commit f2cedae
committed
fix: add safety-net exit for bubbletea renderer deadlock on /exit
When the user types /exit, bubbletea's cursedRenderer can deadlock: its
ticker-driven flush goroutine holds a mutex while blocked writing to
stdout, and the event loop's final render() call after tea.Quit blocks
on the same mutex. p.Run() never returns and the process hangs.
Add a safety-net goroutine in cleanupAll() that calls os.Exit(0) after
5 seconds, guaranteeing the process terminates even when bubbletea's
renderer is deadlocked.
Fixes #2268
Assisted-By: docker-agent1 parent 990dcd5 commit f2cedae
1 file changed
+11
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2103 | 2103 | | |
2104 | 2104 | | |
2105 | 2105 | | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
| 2116 | + | |
2106 | 2117 | | |
2107 | 2118 | | |
2108 | 2119 | | |
| |||
0 commit comments