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 | |
parent | 559441cc80ba9a9ce0a886fed9bdc269a58c547f (diff) | |
download | zsh-51608eb1f02cc256239cd9b9c334dbc0cd1dc528.tar.gz zsh-51608eb1f02cc256239cd9b9c334dbc0cd1dc528.tar.xz zsh-51608eb1f02cc256239cd9b9c334dbc0cd1dc528.zip |
22049: bug exiting from sourced file within function
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Src/init.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 903f9848e..9992f5874 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-12-03 Peter Stephenson <p.w.stephenson@ntlworld.com> + + * 22049: Src/init.c: "exit" within sourced file within shell + function caused return from sourced file but execution of function + continued. + 2005-11-30 Peter Stephenson <pws@csr.com> * unposted: Etc/FAQ.yo: release 4.2.6. 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; |