about summary refs log tree commit diff
path: root/Src/init.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2005-12-03 00:14:05 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2005-12-03 00:14:05 +0000
commitbf3ee0f725411f3829f3b646692eaec14f03776d (patch)
treed2bc4d35633ac9173aeba68dca02e3a8fd83b93b /Src/init.c
parent3bd51758efc701d0b78e08744478fcdeab3c632e (diff)
downloadzsh-bf3ee0f725411f3829f3b646692eaec14f03776d.tar.gz
zsh-bf3ee0f725411f3829f3b646692eaec14f03776d.tar.xz
zsh-bf3ee0f725411f3829f3b646692eaec14f03776d.zip
22049: bug exiting from sourced file within function
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 c7f20a1bd..6751df6ba 100644
--- a/Src/init.c
+++ b/Src/init.c
@@ -1085,7 +1085,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;