diff options
author | Denys Vlasenko | 2016-10-01 15:10:16 +0200 |
---|---|---|
committer | Denys Vlasenko | 2016-10-01 15:10:16 +0200 |
commit | 7b3fa1e441bbb34a9edccf17b71efc34499bde9f (patch) | |
tree | 55251915b1a6c268872ca69ae6cb0160a7ebe71c /shell/hush_test/hush-vars/var2.tests | |
parent | 08089c7c85a72d5eaf2bed22033098b263f58a3e (diff) | |
download | busybox-7b3fa1e441bbb34a9edccf17b71efc34499bde9f.zip busybox-7b3fa1e441bbb34a9edccf17b71efc34499bde9f.tar.gz |
ash: [EVAL] Pass EV_TESTED into evalcmd
Upstream commit:
Date: Tue Aug 11 20:48:15 2009 +1000
[EVAL] Pass EV_TESTED into evalcmd
This patch fixes the case where the eval command is used with
set -e and as part of a construct that should not cause the
shell to abort, e.g., as part of the condition of an if statement.
This is achieved by propagating the EV_TESTED flag into the
evalstring function through evalcmd. As this alters the prototype
of evalcmd it is now invoked explicitly by evalbltin. The built-in
infrastructure has been changed to accomodate this special case.
In order to ensure that the EXIT trap is properly executed this
patch clears evalskip in exitshell. This wasn't needed before
because of the broken way evalstring worked where it always clears
evalskip when called by minusc.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Although, I failed to create a reproducer for this.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test/hush-vars/var2.tests')
0 files changed, 0 insertions, 0 deletions