diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2024-04-30 04:30:21 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-30 04:30:21 -0700 |
commit | 71cf75f96a67aeb79ac3af6aa829bac81bd2d33d (patch) | |
tree | b6582df55b2956fb2077f2d79c2cc7b6acf37c84 /src/nvim/channel.c | |
parent | efaf37a2b9450d56acbf48a44c3c791d00d70199 (diff) | |
download | rneovim-71cf75f96a67aeb79ac3af6aa829bac81bd2d33d.tar.gz rneovim-71cf75f96a67aeb79ac3af6aa829bac81bd2d33d.tar.bz2 rneovim-71cf75f96a67aeb79ac3af6aa829bac81bd2d33d.zip |
docs: misc #24163
- Also delete old perl scripts which are not used since 8+ years ago.
fix #23251
fix #27367
ref https://github.com/neovim/neovim/issues/2252#issuecomment-1902662577
Helped-by: Daniel Kongsgaard <dakongsgaard@gmail.com>
Co-authored-by: Kevin Pham <keevan.pham@gmail.com>
Diffstat (limited to 'src/nvim/channel.c')
-rw-r--r-- | src/nvim/channel.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/channel.c b/src/nvim/channel.c index b64edae2bf..41635747f8 100644 --- a/src/nvim/channel.c +++ b/src/nvim/channel.c @@ -544,10 +544,9 @@ uint64_t channel_from_stdio(bool rpc, CallbackReader on_output, const char **err } #else if (embedded_mode) { - // In embedded mode redirect stdout and stdin to stderr, since they are used for the UI channel. - // NOTE: fnctl with F_DUPFD_CLOEXEC is used instead of dup to prevent child processes from - // inheriting the file descriptors, which make it impossible for UIs to detect when nvim exits - // while one or more of its child processes are still running. + // Redirect stdout/stdin (the UI channel) to stderr. Use fnctl(F_DUPFD_CLOEXEC) instead of dup() + // to prevent child processes from inheriting the file descriptors, which are used by UIs to + // detect when Nvim exits. stdin_dup_fd = fcntl(STDIN_FILENO, F_DUPFD_CLOEXEC, STDERR_FILENO + 1); stdout_dup_fd = fcntl(STDOUT_FILENO, F_DUPFD_CLOEXEC, STDERR_FILENO + 1); dup2(STDERR_FILENO, STDOUT_FILENO); |