Mercurial > vim
comparison src/os_unix.c @ 12389:d0cf7f71b95b v8.0.1074
patch 8.0.1074: ":term NONE" does not work on MS-Windows
commit https://github.com/vim/vim/commit/2dc9d26c14e410c09e538cccfa90da19ae344ba4
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Sep 8 14:39:30 2017 +0200
patch 8.0.1074: ":term NONE" does not work on MS-Windows
Problem: ":term NONE" does not work on MS-Windows.
Solution: Make it work. Split "pty" into "pty_in" and "pty_out". (Yasuhiro
Matsumoto, closes #2058, closes #2045)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 08 Sep 2017 14:45:05 +0200 |
parents | d7f087d1b0e5 |
children | f28067b83dec |
comparison
equal
deleted
inserted
replaced
12388:9741eade42c9 | 12389:d0cf7f71b95b |
---|---|
5261 | 5261 |
5262 if (options->jo_pty | 5262 if (options->jo_pty |
5263 && (!(use_file_for_in || use_null_for_in) | 5263 && (!(use_file_for_in || use_null_for_in) |
5264 || !(use_file_for_in || use_null_for_out) | 5264 || !(use_file_for_in || use_null_for_out) |
5265 || !(use_out_for_err || use_file_for_err || use_null_for_err))) | 5265 || !(use_out_for_err || use_file_for_err || use_null_for_err))) |
5266 open_pty(&pty_master_fd, &pty_slave_fd, &job->jv_tty_name); | 5266 { |
5267 open_pty(&pty_master_fd, &pty_slave_fd, &job->jv_tty_out); | |
5268 if (job->jv_tty_out != NULL) | |
5269 job->jv_tty_in = vim_strsave(job->jv_tty_out); | |
5270 } | |
5267 | 5271 |
5268 /* TODO: without the channel feature connect the child to /dev/null? */ | 5272 /* TODO: without the channel feature connect the child to /dev/null? */ |
5269 /* Open pipes for stdin, stdout, stderr. */ | 5273 /* Open pipes for stdin, stdout, stderr. */ |
5270 if (use_file_for_in) | 5274 if (use_file_for_in) |
5271 { | 5275 { |
5685 { | 5689 { |
5686 int pty_master_fd = -1; | 5690 int pty_master_fd = -1; |
5687 int pty_slave_fd = -1; | 5691 int pty_slave_fd = -1; |
5688 channel_T *channel; | 5692 channel_T *channel; |
5689 | 5693 |
5690 open_pty(&pty_master_fd, &pty_slave_fd, &job->jv_tty_name); | 5694 open_pty(&pty_master_fd, &pty_slave_fd, &job->jv_tty_out); |
5695 if (job->jv_tty_out != NULL) | |
5696 job->jv_tty_in = vim_strsave(job->jv_tty_out); | |
5691 close(pty_slave_fd); | 5697 close(pty_slave_fd); |
5692 | 5698 |
5693 channel = add_channel(); | 5699 channel = add_channel(); |
5694 if (channel == NULL) | 5700 if (channel == NULL) |
5695 { | 5701 { |