Hi,

this bug is fixed in the OpenBSD tree. You might want to consider it.

        -Otto


Index: ./cl/cl_screen.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/cl/cl_screen.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -p -r1.14 -r1.15
--- ./cl/cl_screen.c    18 Jul 2003 23:11:43 -0000      1.14
+++ ./cl/cl_screen.c    21 Apr 2005 09:00:25 -0000      1.15
@@ -1,4 +1,4 @@
-/*     $OpenBSD: cl_screen.c,v 1.14 2003/07/18 23:11:43 david Exp $    */
+/*     $OpenBSD: cl_screen.c,v 1.15 2005/04/21 09:00:25 otto Exp $     */
 
 /*-
  * Copyright (c) 1993, 1994
@@ -371,6 +371,8 @@ cl_vi_init(sp)
 
 fast:  /* Set the terminal modes. */
        if (tcsetattr(STDIN_FILENO, TCSASOFT | TCSADRAIN, &clp->vi_enter)) {
+               if (errno == EINTR)
+                       goto fast;
                msgq(sp, M_SYSERR, "tcsetattr");
 err:           (void)cl_vi_end(sp->gp);
                return (1);
@@ -489,6 +491,8 @@ cl_ex_init(sp)
 #endif
 
 fast:  if (tcsetattr(STDIN_FILENO, TCSADRAIN | TCSASOFT, &clp->ex_enter)) {
+               if (errno == EINTR)
+                       goto fast;
                msgq(sp, M_SYSERR, "tcsetattr");
                return (1);
        }

Reply via email to