mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06: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:
parent
677eae6b0f
commit
1e593436d0
@ -126,8 +126,10 @@ void process_teardown(Loop *loop) FUNC_ATTR_NONNULL_ALL
|
||||
}
|
||||
}
|
||||
|
||||
// Wait until all children exit
|
||||
LOOP_PROCESS_EVENTS_UNTIL(loop, loop->events, -1, kl_empty(loop->children));
|
||||
// Wait until all children exit and all close events are processed.
|
||||
LOOP_PROCESS_EVENTS_UNTIL(
|
||||
loop, loop->events, -1,
|
||||
kl_empty(loop->children) && queue_empty(loop->events));
|
||||
pty_process_teardown(loop);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user