mirror of
https://github.com/neovim/neovim.git
synced 2025-09-24 12:08:33 +00:00
fix(ui): Windows :detach is opt-in
Problem: On Windows, spawning the `nvim --embed` server with `detach=true` breaks various `tt.setup_child_nvim` tests. Solution: Make this behavior opt-in with an env var, temporarily.
This commit is contained in:
@@ -438,9 +438,9 @@ static void on_proc_exit(Proc *proc)
|
||||
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);
|
||||
// }
|
||||
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
|
||||
|
@@ -62,7 +62,8 @@ uint64_t ui_client_start_server(int argc, char **argv)
|
||||
on_err.fwd_err = true;
|
||||
|
||||
#ifdef MSWIN
|
||||
bool detach = false; // TODO(justinmk): detach=true breaks `tt.setup_child_nvim` tests on Windows.
|
||||
// TODO(justinmk): detach breaks `tt.setup_child_nvim` tests on Windows?
|
||||
bool detach = os_env_exists("__NVIM_DETACH");
|
||||
#else
|
||||
bool detach = true;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user