mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-03 10:21:46 +02:00
manual/7436-for-pws-2
This commit is contained in:
parent
61d274bb7a
commit
bc8a27a277
1 changed files with 3 additions and 2 deletions
|
@ -1528,7 +1528,7 @@ execcmd(Cmd cmd, int input, int output, int how, int last1)
|
|||
|
||||
/* Current shell should not fork unless the *
|
||||
* exec occurs at the end of a pipeline. */
|
||||
if ((cflags & BINF_EXEC) && last1 == 2)
|
||||
if ((cflags & BINF_EXEC) && last1)
|
||||
flags |= CFLAG_EXEC;
|
||||
|
||||
/* Empty command */
|
||||
|
@ -2069,8 +2069,9 @@ execcmd(Cmd cmd, int input, int output, int how, int last1)
|
|||
restore_params(restorelist, removelist);
|
||||
|
||||
} else {
|
||||
if (flags & CFLAG_EXEC) {
|
||||
if (!forked)
|
||||
setiparam("SHLVL", --shlvl);
|
||||
if (flags & CFLAG_EXEC) {
|
||||
/* If we are exec'ing a command, and we are not *
|
||||
* in a subshell, then save the history file. */
|
||||
if (!subsh && isset(RCS) && interact && !nohistsave)
|
||||
|
|
Loading…
Reference in a new issue