mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 17:36:29 +00:00
refactor: rename mch_exit => os_exit
- No code changes - Move it to main.c
This commit is contained in:
@@ -72,28 +72,3 @@ void mch_free_acl(vim_acl_T aclent)
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
void mch_exit(int r)
|
||||
FUNC_ATTR_NORETURN
|
||||
{
|
||||
exiting = true;
|
||||
|
||||
ui_flush();
|
||||
ui_call_stop();
|
||||
ml_close_all(true); // remove all memfiles
|
||||
|
||||
if (!event_teardown() && r == 0) {
|
||||
r = 1; // Exit with error if main_loop did not teardown gracefully.
|
||||
}
|
||||
if (input_global_fd() >= 0) {
|
||||
stream_set_blocking(input_global_fd(), true); // normalize stream (#2598)
|
||||
}
|
||||
|
||||
ILOG("Nvim exit: %d", r);
|
||||
|
||||
#ifdef EXITFREE
|
||||
free_all_mem();
|
||||
#endif
|
||||
|
||||
exit(r);
|
||||
}
|
||||
|
Reference in New Issue
Block a user