Files
neovim/test/functional/api
Justin M. Keyes 5b1c21f4b8 fix(lifecycle): late signal kills Nvim mid-teardown
Problem:
A deadly signal arriving during teardown can kill Nvim while it is
preserving swapfiles. `os_exit()` ignores deadly signals via
`signal_reject_deadly()`, but `signal_teardown()` => `uv_signal_stop()`
resets them to the default behavior, so SIGHUP arriving after that
kills the process:

    [Process exited 129]      // 128 + SIGHUP

This is a race when closing a pty: kernel sends SIGHUP to foreground
process group *and* the reads return EOF, so `chanclose()` on a TUI job
prepares to exit twice. This means it is unpredictable whether Nvim
exits 1 or is terminated.

Solution:
Ignore deadly signals once the watchers are closed. Only SIGKILL
interrupts it now.
2026-08-19 15:46:58 +02:00
..