summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2009-03-02 10:21:37 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2009-03-02 10:21:37 +0000
commit4dbe63360d153a5594c676d5f68db36c1e976a40 (patch)
treeec704702eb123f53601b505af96cce4bb0bc57e1
parent535afe3b2a95afe7d9de5f95abc903119156ceee (diff)
downloadzsh-4dbe63360d153a5594c676d5f68db36c1e976a40.tar.gz
zsh-4dbe63360d153a5594c676d5f68db36c1e976a40.tar.xz
zsh-4dbe63360d153a5594c676d5f68db36c1e976a40.zip
Lionel Flandrin: 26625: inopportune interrupt wrecked terminal set up
-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