diff options
-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 aa6b64b66..c8a3c2a5a 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 Wayne Davison <wayned@users.sourceforge.net> * unposted: Src/Zle/zle_misc.c: fixed parsedigit() to have 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; |