BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001047 [BusyBox] Standards Compliance minor always 09-24-06 05:54 02-14-08 08:35
Reporter walter View Status public  
Assigned To BusyBox
Priority normal Resolution open  
Status assigned   Product Version
Summary 0001047: ash uses the variables in a way not visible to printenv
Description clearly ash uses the variables in a way not visible to printenv
and different to sh. the example shows that only if variables are exported
showup with printenv.

#/* test program */
f()
{
printenv FOO
}

echo "set + function"
FOO=test f
echo "printenv"
printenv FOO

echo "exported + printenv"
export FOO=exported
printenv FOO
Additional Information This is the output with /bin/sh

set + function
test
printenv
test
exported + printenv
exported
-------------------------------------
This is the output with bb ash

set + function
printenv
exported + printenv
exported

Attached Files

- Relationships

- Notes
(0004714)
vda
02-14-08 08:35
edited on: 02-14-08 08:36

printenv has nothing to do with it.

Smaller testcase:

f() { true; }
echo "case 1"
FOO=test /bin/true
env | grep FOO
echo "case 2"
FOO=test f
env | grep FOO

Surprisingly, with bash 3.2 in case 2 ("VAR=val shell_function") FOO actually remains set in environment after shell function finishes, as if it was an exported variable! This is strange and may be a bash bug.

$ sh testcase2
case 1
case 2
FOO=test

$ ./busybox ash testcase2
case 1
case 2

 

- Issue History
Date Modified Username Field Change
09-24-06 05:54 walter New Issue
09-24-06 05:54 walter Status new => assigned
09-24-06 05:54 walter Assigned To  => BusyBox
02-14-08 08:35 vda Note Added: 0004714
02-14-08 08:35 vda Note Edited: 0004714
02-14-08 08:36 vda Note Edited: 0004714


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker