mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 08:28:34 +00:00
process.c: Close events are processed too late
Compiling with macro -DEXITFREE opens a code path on which the event loop is used after it was teared down, because not all close events were processed yet.
This commit is contained in:
@@ -126,8 +126,10 @@ void process_teardown(Loop *loop) FUNC_ATTR_NONNULL_ALL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wait until all children exit
|
// Wait until all children exit and all close events are processed.
|
||||||
LOOP_PROCESS_EVENTS_UNTIL(loop, loop->events, -1, kl_empty(loop->children));
|
LOOP_PROCESS_EVENTS_UNTIL(
|
||||||
|
loop, loop->events, -1,
|
||||||
|
kl_empty(loop->children) && queue_empty(loop->events));
|
||||||
pty_process_teardown(loop);
|
pty_process_teardown(loop);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user