mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 23:06:14 +00:00
refactor(channel): eliminate special case in on_proc_exit() #32485
Problem: on_proc_exit() has a special-case that assumes that the UI client will never spawn more than 1 child process. Solution: If the Nvim server exits, the stream EOF will trigger `rpc_close()` in the UI client, so we don't need the special case in `on_proc_exit`. Pass `Channel.exit_status` from `rpc_close()` so that the correct exit code is reflected.
This commit is contained in:
@@ -40,7 +40,7 @@ struct Channel {
|
||||
CallbackReader on_data;
|
||||
CallbackReader on_stderr;
|
||||
Callback on_exit;
|
||||
int exit_status;
|
||||
int exit_status; ///< Process exit-code (if the channel wraps a process).
|
||||
|
||||
bool callback_busy;
|
||||
bool callback_scheduled;
|
||||
|
Reference in New Issue
Block a user