comparison src/terminal.c @ 15632:d4a6d575e910 v8.1.0824

patch 8.1.0824: SunOS/Solaris has a problem with ttys commit https://github.com/vim/vim/commit/1ecc5e4a995ade68ae216bb56f6ac9bd5c0b7e4b Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 26 15:12:55 2019 +0100 patch 8.1.0824: SunOS/Solaris has a problem with ttys Problem: SunOS/Solaris has a problem with ttys. Solution: Add mch_isatty() with extra handling for SunOS. (Ozaki Kiichi, closes #3865)
author Bram Moolenaar <Bram@vim.org>
date Sat, 26 Jan 2019 15:15:12 +0100
parents d89c5b339c2a
children 01890a3caefd
comparison
equal deleted inserted replaced
15631:8896e3b99db4 15632:d4a6d575e910
871 871
872 for (i = 0; i < 3; ++i) 872 for (i = 0; i < 3; ++i)
873 { 873 {
874 int fd = term->tl_job->jv_channel->ch_part[parts[i]].ch_fd; 874 int fd = term->tl_job->jv_channel->ch_part[parts[i]].ch_fd;
875 875
876 if (isatty(fd)) 876 if (mch_isatty(fd))
877 return parts[i]; 877 return parts[i];
878 } 878 }
879 #endif 879 #endif
880 return PART_IN; 880 return PART_IN;
881 } 881 }
2180 /* 2180 /*
2181 * The shell or another program may change the tty settings. Getting 2181 * The shell or another program may change the tty settings. Getting
2182 * them for every typed character is a bit of overhead, but it's needed 2182 * them for every typed character is a bit of overhead, but it's needed
2183 * for the first character typed, e.g. when Vim starts in a shell. 2183 * for the first character typed, e.g. when Vim starts in a shell.
2184 */ 2184 */
2185 if (isatty(tty_fd)) 2185 if (mch_isatty(tty_fd))
2186 { 2186 {
2187 ttyinfo_T info; 2187 ttyinfo_T info;
2188 2188
2189 /* Get the current backspace character of the pty. */ 2189 /* Get the current backspace character of the pty. */
2190 if (get_tty_info(tty_fd, &info) == OK) 2190 if (get_tty_info(tty_fd, &info) == OK)
5880 int part; 5880 int part;
5881 5881
5882 for (part = PART_OUT; part < PART_COUNT; ++part) 5882 for (part = PART_OUT; part < PART_COUNT; ++part)
5883 { 5883 {
5884 fd = term->tl_job->jv_channel->ch_part[part].ch_fd; 5884 fd = term->tl_job->jv_channel->ch_part[part].ch_fd;
5885 if (isatty(fd)) 5885 if (mch_isatty(fd))
5886 break; 5886 break;
5887 } 5887 }
5888 if (part < PART_COUNT && mch_report_winsize(fd, rows, cols) == OK) 5888 if (part < PART_COUNT && mch_report_winsize(fd, rows, cols) == OK)
5889 mch_signal_job(term->tl_job, (char_u *)"winch"); 5889 mch_signal_job(term->tl_job, (char_u *)"winch");
5890 } 5890 }