diff 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
line wrap: on
line diff
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -5263,7 +5263,11 @@ mch_job_start(char **argv, job_T *job, j
 	    && (!(use_file_for_in || use_null_for_in)
 		|| !(use_file_for_in || use_null_for_out)
 		|| !(use_out_for_err || use_file_for_err || use_null_for_err)))
-	open_pty(&pty_master_fd, &pty_slave_fd, &job->jv_tty_name);
+    {
+	open_pty(&pty_master_fd, &pty_slave_fd, &job->jv_tty_out);
+	if (job->jv_tty_out != NULL)
+	    job->jv_tty_in = vim_strsave(job->jv_tty_out);
+    }
 
     /* TODO: without the channel feature connect the child to /dev/null? */
     /* Open pipes for stdin, stdout, stderr. */
@@ -5687,7 +5691,9 @@ mch_create_pty_channel(job_T *job, jobop
     int		pty_slave_fd = -1;
     channel_T	*channel;
 
-    open_pty(&pty_master_fd, &pty_slave_fd, &job->jv_tty_name);
+    open_pty(&pty_master_fd, &pty_slave_fd, &job->jv_tty_out);
+    if (job->jv_tty_out != NULL)
+	job->jv_tty_in = vim_strsave(job->jv_tty_out);
     close(pty_slave_fd);
 
     channel = add_channel();