diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2005-12-03 00:14:25 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2005-12-03 00:14:25 +0000 |
commit | 51608eb1f02cc256239cd9b9c334dbc0cd1dc528 (patch) | |
tree | 948fa0f00a4bc6eaf206c2cdd932898b16b01b35 /Src/init.c | |
parent | 559441cc80ba9a9ce0a886fed9bdc269a58c547f (diff) | |
download | zsh-51608eb1f02cc256239cd9b9c334dbc0cd1dc528.tar.gz zsh-51608eb1f02cc256239cd9b9c334dbc0cd1dc528.tar.xz zsh-51608eb1f02cc256239cd9b9c334dbc0cd1dc528.zip |
22049: bug exiting from sourced file within function
Diffstat (limited to 'Src/init.c')
-rw-r--r-- | Src/init.c | 3 |
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; |