mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-21 00:01:26 +01:00
PRINT_EXIT_VALUE for shell functions.
This commit is contained in:
parent
2e4a17b32f
commit
f0dd0ced30
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
|||
2001-06-24 Bart Schaefer <schaefer@zsh.org>
|
||||
|
||||
* 15057: Src/exec.c: PRINT_EXIT_VALUE for shell functions, too.
|
||||
|
||||
2001-06-23 Bart Schaefer <schaefer@zsh.org>
|
||||
|
||||
* 15056: Src/Zle/zle_tricky.c: Change magic-space to recognize
|
||||
|
|
|
@ -2288,9 +2288,6 @@ execcmd(Estate state, int input, int output, int how, int last1)
|
|||
#ifdef PATH_DEV_FD
|
||||
closem(2);
|
||||
#endif
|
||||
if (isset(PRINTEXITVALUE) && isset(SHINSTDIN) && lastval && !subsh) {
|
||||
fprintf(stderr, "zsh: exit %ld\n", (long)lastval);
|
||||
}
|
||||
fflush(stdout);
|
||||
if (save[1] == -2) {
|
||||
if (ferror(stdout)) {
|
||||
|
@ -2300,6 +2297,10 @@ execcmd(Estate state, int input, int output, int how, int last1)
|
|||
} else
|
||||
clearerr(stdout);
|
||||
}
|
||||
if (isset(PRINTEXITVALUE) && isset(SHINSTDIN) &&
|
||||
lastval && !subsh) {
|
||||
fprintf(stderr, "zsh: exit %ld\n", (long)lastval);
|
||||
}
|
||||
|
||||
if (do_exec) {
|
||||
if (subsh)
|
||||
|
|
Loading…
Reference in a new issue