comparison src/os_unix.c @ 13778:5f6c61a71c02 v8.0.1761

patch 8.0.1761: job in terminal window with no output channel is killed commit https://github.com/vim/vim/commit/4e9d443a25b451e3f2de62e9eeea439aa4c3f039 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Apr 24 20:54:07 2018 +0200 patch 8.0.1761: job in terminal window with no output channel is killed Problem: Job in terminal window with no output channel is killed. Solution: Keep the job running when the input is a tty. (Ozaki Kiichi, closes #2734)
author Christian Brabandt <cb@256bit.org>
date Tue, 24 Apr 2018 21:00:07 +0200
parents 9de2b25932eb
children fa0dcdaec6a3
comparison
equal deleted inserted replaced
13777:bdecc420bd2c 13778:5f6c61a71c02
5636 close(fd_out[1]); 5636 close(fd_out[1]);
5637 if (fd_err[1] >= 0) 5637 if (fd_err[1] >= 0)
5638 close(fd_err[1]); 5638 close(fd_err[1]);
5639 if (channel != NULL) 5639 if (channel != NULL)
5640 { 5640 {
5641 channel_set_pipes(channel, 5641 int in_fd = use_file_for_in || use_null_for_in
5642 use_file_for_in || use_null_for_in 5642 ? INVALID_FD : fd_in[1] < 0 ? pty_master_fd : fd_in[1];
5643 ? INVALID_FD : fd_in[1] < 0 ? pty_master_fd : fd_in[1], 5643 int out_fd = use_file_for_out || use_null_for_out
5644 use_file_for_out || use_null_for_out 5644 ? INVALID_FD : fd_out[0] < 0 ? pty_master_fd : fd_out[0];
5645 ? INVALID_FD : fd_out[0] < 0 ? pty_master_fd : fd_out[0], 5645 int err_fd = use_out_for_err || use_file_for_err || use_null_for_err
5646 use_out_for_err || use_file_for_err || use_null_for_err 5646 ? INVALID_FD : fd_err[0] < 0 ? pty_master_fd : fd_err[0];
5647 ? INVALID_FD : fd_err[0] < 0 ? pty_master_fd : fd_err[0]); 5647
5648 channel_set_pipes(channel, in_fd, out_fd, err_fd);
5648 channel_set_job(channel, job, options); 5649 channel_set_job(channel, job, options);
5649 } 5650 }
5650 else 5651 else
5651 { 5652 {
5652 if (fd_in[1] >= 0) 5653 if (fd_in[1] >= 0)