To: [email protected]
Subject: Patch 6.2f.017
Fcc: outbox
From: Bram Moolenaar <[email protected]>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------

Patch 6.2f.017
Problem:    Unix: starting Vim in the background and then bringing it to the
           foreground may cause the termainal settings to be wrong.
Solution:   Check for tcsetattr() to return an error, retry when it does.
           (Paul Tapper)
Files:      src/os_unix.c


*** ../vim-6.2f.016/src/os_unix.c       Mon May 26 22:58:41 2003
--- src/os_unix.c       Wed May 28 22:45:05 2003
***************
*** 2690,2696 ****
       tnew.c_lflag &= ~(ECHO);

 # if defined(HAVE_TERMIOS_H)
!     tcsetattr(read_cmd_fd, TCSANOW, &tnew);
 # else
     ioctl(read_cmd_fd, TCSETA, &tnew);
 # endif
--- 2690,2704 ----
       tnew.c_lflag &= ~(ECHO);

 # if defined(HAVE_TERMIOS_H)
!     {
!       int     n = 10;
!
!       /* A signal may cause tcsetattr() to fail (e.g., SIGCONT).  Retry a
!        * few times. */
!       while (tcsetattr(read_cmd_fd, TCSANOW, &tnew) == -1
!                                                  && errno == EINTR && n > 0)
!           --n;
!     }
 # else
     ioctl(read_cmd_fd, TCSETA, &tnew);
 # endif
*** ../vim-6.2f.016/src/version.c       Thu May 29 13:32:53 2003
--- src/version.c       Thu May 29 13:34:52 2003
***************
*** 632,633 ****
--- 632,635 ----
 {   /* Add new patch number below this line */
+ /**/
+     17,
 /**/

--
hundred-and-one symptoms of being an internet addict:
24. You realize there is not a sound in the house and you have no idea where
   your children are.

/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
\\\     Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///