diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-02-02 10:05:03 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-02 10:05:03 +0800 |
commit | 2c5906b55bb6092121f4d3b032d5449da7675c2b (patch) | |
tree | 12bc52db168cb9ecd5bb743c9b8013b4637ad260 /src/nvim/main.c | |
parent | ecc1595c7b81987ca9d6265d1e08ef37a05c95bf (diff) | |
download | rneovim-2c5906b55bb6092121f4d3b032d5449da7675c2b.tar.gz rneovim-2c5906b55bb6092121f4d3b032d5449da7675c2b.tar.bz2 rneovim-2c5906b55bb6092121f4d3b032d5449da7675c2b.zip |
fix(exit): skip unnecessary steps in TUI preserve_exit() (#21897)
This prevents the TUI from doing unexpected things when receiving a
deadly signal or running out of memory.
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r-- | src/nvim/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c index 8df82c710a..e26922bf8e 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -811,6 +811,11 @@ void preserve_exit(void) really_exiting = true; // Ignore SIGHUP while we are already exiting. #9274 signal_reject_deadly(); + + if (ui_client_channel_id) { + os_exit(1); + } + os_errmsg(IObuff); os_errmsg("\n"); ui_flush(); |