diff 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
line wrap: on
line diff
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -873,7 +873,7 @@ get_tty_part(term_T *term)
     {
 	int fd = term->tl_job->jv_channel->ch_part[parts[i]].ch_fd;
 
-	if (isatty(fd))
+	if (mch_isatty(fd))
 	    return parts[i];
     }
 #endif
@@ -2182,7 +2182,7 @@ terminal_loop(int blocking)
 	 * them for every typed character is a bit of overhead, but it's needed
 	 * for the first character typed, e.g. when Vim starts in a shell.
 	 */
-	if (isatty(tty_fd))
+	if (mch_isatty(tty_fd))
 	{
 	    ttyinfo_T info;
 
@@ -5882,7 +5882,7 @@ term_report_winsize(term_T *term, int ro
 	for (part = PART_OUT; part < PART_COUNT; ++part)
 	{
 	    fd = term->tl_job->jv_channel->ch_part[part].ch_fd;
-	    if (isatty(fd))
+	    if (mch_isatty(fd))
 		break;
 	}
 	if (part < PART_COUNT && mch_report_winsize(fd, rows, cols) == OK)