mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
event: Assert that all libuv handles are closed on exit.
Travis build will now fail when core files are dumped, so call `abort()` when the event loop is not fully released before exiting.
This commit is contained in:
parent
636fc6b08d
commit
c9cc2aa53d
@ -79,12 +79,14 @@ void event_teardown(void)
|
|||||||
signal_teardown();
|
signal_teardown();
|
||||||
input_stop();
|
input_stop();
|
||||||
input_teardown();
|
input_teardown();
|
||||||
do {
|
// this last `uv_run` will return after all handles are stopped, it will
|
||||||
// This will loop forever if we leave any unclosed handles. Currently it is
|
// also take care of finishing any uv_close calls made by other *_teardown
|
||||||
// the most reliable way to use travis for verifying the no libuv-related
|
// functions.
|
||||||
// bugs(which can be hard to track later) were introduced on a PR.
|
uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
||||||
uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
// abort that if we left unclosed handles
|
||||||
} while (uv_loop_close(uv_default_loop()));
|
if (uv_loop_close(uv_default_loop())) {
|
||||||
|
abort();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wait for some event
|
// Wait for some event
|
||||||
|
Loading…
Reference in New Issue
Block a user