aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/event
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2025-02-17 02:26:19 -0800
committerGitHub <noreply@github.com>2025-02-17 02:26:19 -0800
commitb360c0608556232c8ddb7ecc9cd26e68584bee76 (patch)
treedd9305fdc82de030d3f743008d2922a77757ce49 /src/nvim/event
parentbd0a65bc151a7a496e913125f54814f591845e91 (diff)
downloadrneovim-b360c0608556232c8ddb7ecc9cd26e68584bee76.tar.gz
rneovim-b360c0608556232c8ddb7ecc9cd26e68584bee76.tar.bz2
rneovim-b360c0608556232c8ddb7ecc9cd26e68584bee76.zip
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.
Diffstat (limited to 'src/nvim/event')
-rw-r--r--src/nvim/event/proc.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/nvim/event/proc.c b/src/nvim/event/proc.c
index e32bbbc29a..1a5e01eb9d 100644
--- a/src/nvim/event/proc.c
+++ b/src/nvim/event/proc.c
@@ -437,11 +437,6 @@ static void on_proc_exit(Proc *proc)
Loop *loop = proc->loop;
ILOG("child exited: pid=%d status=%d" PRIu64, proc->pid, proc->status);
- // XXX: This assumes the TUI never spawns any other processes...?
- if (ui_client_channel_id) {
- exit_on_closed_chan(proc->status);
- }
-
// Process has terminated, but there could still be data to be read from the
// OS. We are still in the libuv loop, so we cannot call code that polls for
// more data directly. Instead delay the reading after the libuv loop by