From 585e059c1841f9e7bab298df9aceec7174f4bbfd Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Mon, 30 Aug 1999 16:51:14 +0000 Subject: zsh-3.1.6-pws-2 --- Src/exec.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Src/exec.c') diff --git a/Src/exec.c b/Src/exec.c index 5ee161fff..97e8f4912 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -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) + if ((cflags & BINF_EXEC) && last1 == 2) flags |= CFLAG_EXEC; /* Empty command */ @@ -2062,9 +2062,8 @@ execcmd(Cmd cmd, int input, int output, int how, int last1) restore_params(restorelist, removelist); } else { - if (!forked) - setiparam("SHLVL", --shlvl); if (flags & CFLAG_EXEC) { + setiparam("SHLVL", --shlvl); /* 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) -- cgit 1.4.1