aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/tui
diff options
context:
space:
mode:
authorphanium <91544758+phanen@users.noreply.github.com>2025-04-02 23:12:19 +0800
committerGitHub <noreply@github.com>2025-04-02 15:12:19 +0000
commit0b61bc8982304c3b8afd9f3c310b112227302bc5 (patch)
treef6489414595acd722e9db33024f24689c0948621 /src/nvim/tui
parent3af43cffa028b88022e6bdc78a4e2f5470643219 (diff)
downloadrneovim-0b61bc8982304c3b8afd9f3c310b112227302bc5.tar.gz
rneovim-0b61bc8982304c3b8afd9f3c310b112227302bc5.tar.bz2
rneovim-0b61bc8982304c3b8afd9f3c310b112227302bc5.zip
fix(events): crash on SIGTSTP (Ctrl-Z) #33258
Problem: Nvim crashes on receive SIGTSTP (Ctrl-Z) since 4dabeff308222307ede8e74a2bd341713a7f7d81. Solution: * Don't exit on SIGTSTP (not a deadly signal). * Avoid SIGTSTP handler in os/signal.c. Co-authored-by: 27Onion Nebell <zzy20080201@gmail.com>
Diffstat (limited to 'src/nvim/tui')
-rw-r--r--src/nvim/tui/tui.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c
index 7c93be844a..c19e419cc0 100644
--- a/src/nvim/tui/tui.c
+++ b/src/nvim/tui/tui.c
@@ -1576,7 +1576,8 @@ void tui_suspend(TUIData *tui)
tui_terminal_stop(tui);
stream_set_blocking(tui->input.in_fd, true); // normalize stream (#2598)
- kill(0, SIGTSTP);
+ // Avoid os/signal.c SIGTSTP handler. ex_stop calls auto_writeall. #33258
+ kill(0, SIGSTOP);
tui_terminal_start(tui);
tui_terminal_after_startup(tui);