about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/init.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Src/init.c b/Src/init.c
index 980d3b1c9..55f32079b 100644
--- a/Src/init.c
+++ b/Src/init.c
@@ -1343,9 +1343,11 @@ zsh_main(UNUSED(int argc), char **argv)
 	 */
 	maybeshrinkjobtab();
 
-	do
+	do {
+	    /* Reset return from top level which gets us back here */
+	    retflag = 0;
 	    loop(1,0);
-	while (tok != ENDINPUT && (tok != LEXERR || isset(SHINSTDIN)));
+	} while (tok != ENDINPUT && (tok != LEXERR || isset(SHINSTDIN)));
 	if (tok == LEXERR) {
 	    /* Make sure a parse error exits with non-zero status */
 	    if (!lastval)