Last change
on this file since 2816 was 2725, checked in by Bruno Cornec, 14 years ago |
- Update mindi-busybox to 1.18.3 to avoid problems with the tar command which is now failing on recent versions with busybox 1.7.3
|
-
Property svn:executable
set to
*
|
File size:
633 bytes
|
Rev | Line | |
---|
[2725] | 1 | # cat is an external program, variable should not leak out of it.
|
---|
| 2 | # this currently fails with CONFIG_FEATURE_SH_NOFORK=y
|
---|
| 3 | VAR=''
|
---|
| 4 | VAR=val0 cat /dev/null
|
---|
| 5 | echo "should be empty: '$VAR'"
|
---|
| 6 |
|
---|
| 7 | # true is a regular builtin, variable should not leak out of it.
|
---|
| 8 | VAR=''
|
---|
| 9 | VAR=val1 true
|
---|
| 10 | echo "should be empty: '$VAR'"
|
---|
| 11 |
|
---|
| 12 | # ash follows the "special builtin leaks variables" rule here:
|
---|
| 13 | # exec is a special builtin. (bash does not do it)
|
---|
| 14 | VAR=''
|
---|
| 15 | VAR=val2 exec 2>&1
|
---|
| 16 | echo "should be not empty: '$VAR'"
|
---|
| 17 |
|
---|
| 18 | # ash follows the "function call is a special builtin" rule here
|
---|
| 19 | # (bash does not do it)
|
---|
| 20 | f() { true; }
|
---|
| 21 | VAR=''
|
---|
| 22 | VAR=val3 f
|
---|
| 23 | echo "should be not empty: '$VAR'"
|
---|
Note:
See
TracBrowser
for help on using the repository browser.