ash: fix unset in standalone mode

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2010-06-18 14:23:47 +02:00
parent 1ed2fb40c9
commit 7df28bbb8f
3 changed files with 4 additions and 0 deletions

View File

@ -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);

View File

@ -0,0 +1 @@
Done: 1

View File

@ -0,0 +1,2 @@
VAR=42 $THIS_SH -c 'unset VAR; env | grep ^VAR'
echo Done: $?