about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/utils.c5
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index a2e781c94..6b0f1242f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2009-03-02  Peter Stephenson  <pws@csr.com>
 
+	* Lionel Flandrin: 26625: Src/utils.c: inopportune interrupt
+	could wreck terminal set up.
+
 	* 26614 plus 26615: Doc/Zsh/builtins.yo, Doc/Zsh/calsys.yo,
 	Doc/Zsh/prompt.yo, Src/builtin.c, Src/utils.c: support
 	-t <fmt> in history and as a side effect support GNU
@@ -11287,5 +11290,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.4588 $                         
+* $Revision: 1.4589 $                         
 *****************************************************
diff --git a/Src/utils.c b/Src/utils.c
index d93dadfd0..3696571bb 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -1436,10 +1436,11 @@ settyinfo(struct ttyinfo *ti)
 #   define TCSADRAIN 1	/* XXX Princeton's include files are screwed up */
 #  endif
 	tcsetattr(SHTTY, TCSADRAIN, &ti->tio);
-    /* if (tcsetattr(SHTTY, TCSADRAIN, &ti->tio) == -1) */
+	while (tcsetattr(SHTTY, TCSADRAIN, &ti->tio) == -1 && errno == EINTR)
+	    ;
 # else
 	ioctl(SHTTY, TCSETS, &ti->tio);
-    /* if (ioctl(SHTTY, TCSETS, &ti->tio) == -1) */
+	while (ioctl(SHTTY, TCSETS, &ti->tio) == -1 && errno == EINTR)
 # endif
 	/*	zerr("settyinfo: %e",errno)*/ ;
 #else