diff options
author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2014-11-02 15:29:06 +0000 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2014-11-02 15:29:06 +0000 |
commit | 023c2236e1280ad1539a2885c6479d0b89d6dc46 (patch) | |
tree | 9552f1a2c6e55fab593ef94749d233cbf640205d /Test | |
parent | 6a29f66f8a96cb7f41d472a2f7c80f75ea9eb92b (diff) | |
download | zsh-023c2236e1280ad1539a2885c6479d0b89d6dc46.tar.gz zsh-023c2236e1280ad1539a2885c6479d0b89d6dc46.tar.xz zsh-023c2236e1280ad1539a2885c6479d0b89d6dc46.zip |
Treat exec from subshell as if forked
This removes weird behaviour when optimising the last command. In particular SHLVL is correct from a subshell executed as the last command.
Diffstat (limited to 'Test')
-rw-r--r-- | Test/D04parameter.ztst | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst index d7f39cb37..0cbe6c95d 100644 --- a/Test/D04parameter.ztst +++ b/Test/D04parameter.ztst @@ -1548,7 +1548,7 @@ foo= print ${foo:wq} print ${:wq} -0:Empty parameter shouldn't cause modifiers to crash the shell +0:Empty parameter should not cause modifiers to crash the shell > > @@ -1656,3 +1656,10 @@ >h:i >j,k >l + + SHLVL=1 + $ZTST_testdir/../Src/zsh -c 'echo $SHLVL' + $ZTST_testdir/../Src/zsh -c '(echo $SHLVL)' +0:SHLVL appears sensible when about to exit shell +>2 +>2 |