ash: fix unset in standalone mode
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
1ed2fb40c9
commit
7df28bbb8f
@ -7252,6 +7252,7 @@ tryexec(IF_FEATURE_SH_STANDALONE(int applet_no,) char *cmd, char **argv, char **
|
||||
#if ENABLE_FEATURE_SH_STANDALONE
|
||||
if (applet_no >= 0) {
|
||||
if (APPLET_IS_NOEXEC(applet_no)) {
|
||||
clearenv();
|
||||
while (*envp)
|
||||
putenv(*envp++);
|
||||
run_applet_no_and_exit(applet_no, argv);
|
||||
|
1
shell/ash_test/ash-standalone/var_standalone1.right
Normal file
1
shell/ash_test/ash-standalone/var_standalone1.right
Normal file
@ -0,0 +1 @@
|
||||
Done: 1
|
2
shell/ash_test/ash-standalone/var_standalone1.tests
Executable file
2
shell/ash_test/ash-standalone/var_standalone1.tests
Executable file
@ -0,0 +1,2 @@
|
||||
VAR=42 $THIS_SH -c 'unset VAR; env | grep ^VAR'
|
||||
echo Done: $?
|
Loading…
Reference in New Issue
Block a user