From f6bb33cac458ba103ee2e94159bc7ae4e2fe2796 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 25 Dec 2024 16:13:54 +0100 Subject: check the life time of subprocesses before freeing vis Currently there is now way for long running subprocesses like language servers to gracefully shutdown. When reacting to the QUIT event and invalidating the process handle the subprocess will never be killed and destroyed because the subprocesses are only checked during vis_run. Collecting and killing subprocesses with invalid handles after the QUIT event allows graceful shutdown. --- vis.c | 1 + 1 file changed, 1 insertion(+) (limited to 'vis.c') diff --git a/vis.c b/vis.c index 10c3df5..d1c0dab 100644 --- a/vis.c +++ b/vis.c @@ -623,6 +623,7 @@ void vis_free(Vis *vis) { while (vis->windows) vis_window_close(vis->windows); vis_event_emit(vis, VIS_EVENT_QUIT); + vis_process_waitall(vis); file_free(vis, vis->command_file); file_free(vis, vis->search_file); file_free(vis, vis->error_file); -- cgit v1.2.3