about summary refs log tree commit diff
path: root/Src/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/init.c')
-rw-r--r--Src/init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/init.c b/Src/init.c
index 9afa2f24e..58b390bfa 100644
--- a/Src/init.c
+++ b/Src/init.c
@@ -1060,7 +1060,8 @@ source(char *s)
     loops = oloops;                  /* the # of nested loops we are in      */
     dosetopt(SHINSTDIN, oldshst, 1); /* SHINSTDIN option                     */
     errflag = 0;
-    retflag = 0;
+    if (!exit_pending)
+	retflag = 0;
     scriptname = old_scriptname;
     free(cmdstack);
     cmdstack = ocs;