about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2001-06-30 18:30:54 +0000
committerBart Schaefer <barts@users.sourceforge.net>2001-06-30 18:30:54 +0000
commit70c4e162c622f1ab6beba4c38652e1fd3d51c398 (patch)
tree1cc4cbe79cbb340fea655faae7ff1b0ef00e0343
parent25e5dd6118c9fadae880a48c78bace0b7282ad44 (diff)
downloadzsh-70c4e162c622f1ab6beba4c38652e1fd3d51c398.tar.gz
zsh-70c4e162c622f1ab6beba4c38652e1fd3d51c398.tar.xz
zsh-70c4e162c622f1ab6beba4c38652e1fd3d51c398.zip
Reset errflag after executing precmd.
-rw-r--r--ChangeLog5
-rw-r--r--Src/init.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a628e8511..b9a5c1398 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-06-30  Bart Schaefer  <schaefer@zsh.org>
+
+	* 15191: Src/init.c: Don't infinite loop if there's an error in
+	the user's precmd -- reset errflag after preprompt().
+
 2001-06-29  Andrej Borsenkow  <bor@zsh.org>
 
 	* 15183: zshconfig.ac: fix DLLD in non-ELF case
diff --git a/Src/init.c b/Src/init.c
index 3da057de9..cbfaf5ad0 100644
--- a/Src/init.c
+++ b/Src/init.c
@@ -107,7 +107,6 @@ loop(int toplevel, int justonce)
     pushheap();
     for (;;) {
 	freeheap();
-	errflag = 0;
 	hbegin(1);		/* init history mech        */
 	if (isset(SHINSTDIN)) {
 	    setblock_stdin();
@@ -116,6 +115,7 @@ loop(int toplevel, int justonce)
 		stophist = 3;
 		preprompt();
 		stophist = hstop;
+		errflag = 0;
 	    }
 	}
 	intr();			/* interrupts on            */