diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | Src/exec.c | 10 |
2 files changed, 12 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog index cb9dcfd71..c4764453d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-02-23 Peter Stephenson <p.w.stephenson@ntlworld.com> + + * 28795: Src/exec.c: tweak to 28791 for forked shells. + Also (unposted) typos in comments noticed by Mikael. + 2011-02-22 Peter Stephenson <p.w.stephenson@ntlworld.com> * 28791: Doc/Zsh/options.yo, Src/builtin.c, Src/exec.c, @@ -14248,5 +14253,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5206 $ +* $Revision: 1.5207 $ ***************************************************** diff --git a/Src/exec.c b/Src/exec.c index 25a2eee38..f1b87e152 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -3300,14 +3300,16 @@ execcmd(Estate state, int input, int output, int how, int last1) if (isset(POSIXBUILTINS) && (cflags & (BINF_PSPECIAL|BINF_EXEC))) { /* - * For POSIX-compatibile behaviour with special + * For POSIX-compatible behaviour with special * builtins (including exec which we don't usually - * classify as a builtin, we treat all errors as fatal. + * classify as a builtin) we treat all errors as fatal. */ if (redir_err || errflag) { if (!isset(INTERACTIVE)) { - /* We've already _exit'ed if forked */ - exit(1); + if (forked) + _exit(1); + else + exit(1); } errflag = 1; } |