mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 09:26:30 +00:00
preserve_exit: Ignore SIGHUP
closes #9274 ref #9028 If stdin closed then read_error_exit calls preserve_exit. Handling SIGHUP during preserve_exit would cause a premature teardown, and conflicts with e.g. ui_bridge_stop which waits for TUI to teardown. Vim ignores SIGHUP in its prepare_to_exit and getout_preserve_modified routines: /* Ignore SIGHUP, because a dropped connection causes a read error, which * makes Vim exit and then handling SIGHUP causes various reentrance * problems. */ signal(SIGHUP, SIG_IGN);
This commit is contained in:
@@ -117,6 +117,7 @@ static void ui_bridge_stop(UI *b)
|
||||
if (stopped) { // -V547
|
||||
break;
|
||||
}
|
||||
// TODO(justinmk): Remove this. Use a cond-wait above. #9274
|
||||
loop_poll_events(&main_loop, 10); // Process one event.
|
||||
}
|
||||
uv_thread_join(&bridge->ui_thread);
|
||||
|
Reference in New Issue
Block a user