mirror of
https://github.com/neovim/neovim.git
synced 2026-09-03 12:50:36 +00:00
Problem:
`signal_ignore_deadly` doesn't work for Windows, where the console still
may terminate Nvim during teardown (after `signal_teardown`), while it
is already trying to exit. Besides interrupting any housekeeping we are
doing, it results in an unpredictable exit code (flaky tests).
[Process exited -1073741510] // 0xC000013A STATUS_CONTROL_C_EXIT
Solution:
Register our own CTRL_CLOSE_EVENT handler which "blocks" the signal.
Note: if exit takes longer than 5s, Windows will consider the process
"hung" and kill it anyway.