aboutsummaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2014-01-14 21:12:21 +0000
committerRon Yorston <rmy@pobox.com>2014-01-14 21:12:21 +0000
commitdb03ff5ea8ce258da4399cb26924e34916dc83f7 (patch)
tree2dfd4048e4c351147a8f46d89b6a72327b199721 /win32
parent1a3717342d6d3e774e4e2171eb8ea81945ec918e (diff)
downloadbusybox-w32-db03ff5ea8ce258da4399cb26924e34916dc83f7.tar.gz
busybox-w32-db03ff5ea8ce258da4399cb26924e34916dc83f7.tar.bz2
busybox-w32-db03ff5ea8ce258da4399cb26924e34916dc83f7.zip
ash: reset pointers to builtin environment variables after fork
The builtin environment variables can be accessed using macros that reference the varinit array. initvar puts pointers to varinit into the variable hash table. During forkshell_prepare two copies of the builtin variables are made: once as the varinit array and again through the pointers in the hash table. One of these copies is accessed by code that uses the macros and the other by code that looks up the variable by name. This is the cause of the strange behaviour of IFS in backticks: https://github.com/pclouds/busybox-w32/issues/12 To avoid the problem the pointers in the hash table are reset to the varinit array in forkshell_init. It seemed easier to do it this way than to try and prevent the duplicate copies being made in the first place.
Diffstat (limited to 'win32')
0 files changed, 0 insertions, 0 deletions