mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
fix(exit): close memfiles after processing events (#30872)
Problem: When exiting, processed events may still use memfiles after they are closed. Solution: Close memfiles after processing events.
This commit is contained in:
parent
0083e03d6f
commit
8c2d45be77
@ -678,12 +678,14 @@ void os_exit(int r)
|
||||
} else {
|
||||
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 (!ui_client_channel_id) {
|
||||
ml_close_all(true); // remove all memfiles
|
||||
}
|
||||
if (used_stdin) {
|
||||
stream_set_blocking(STDIN_FILENO, true); // normalize stream (#2598)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user