diff options
| author | phanium <91544758+phanen@users.noreply.github.com> | 2025-04-02 23:12:19 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-02 15:12:19 +0000 |
| commit | 0b61bc8982304c3b8afd9f3c310b112227302bc5 (patch) | |
| tree | f6489414595acd722e9db33024f24689c0948621 /src/nvim/os | |
| parent | 3af43cffa028b88022e6bdc78a4e2f5470643219 (diff) | |
| download | rneovim-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/os')
| -rw-r--r-- | src/nvim/os/signal.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/os/signal.c b/src/nvim/os/signal.c index 55efce0337..b09d11bc51 100644 --- a/src/nvim/os/signal.c +++ b/src/nvim/os/signal.c @@ -212,10 +212,14 @@ static void on_signal(SignalWatcher *handle, int signum, void *data) // Ignore break; #endif - case SIGTERM: #ifdef SIGTSTP case SIGTSTP: + if (p_awa) { + autowrite_all(); + } + break; #endif + case SIGTERM: #ifdef SIGQUIT case SIGQUIT: #endif |