aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2022-05-05 15:14:10 +0100
committerRon Yorston <rmy@pobox.com>2022-05-05 15:14:10 +0100
commit3b5042430fc4b82d44e0430f9ecc21a9228d1651 (patch)
tree192bbe0db34239cbc927ddeece00162584bca2d4 /init
parent9e535b09a70a1ef7a2260e6d6955f7bbf291a08f (diff)
downloadbusybox-w32-3b5042430fc4b82d44e0430f9ecc21a9228d1651.tar.gz
busybox-w32-3b5042430fc4b82d44e0430f9ecc21a9228d1651.tar.bz2
busybox-w32-3b5042430fc4b82d44e0430f9ecc21a9228d1651.zip
win32: better fix for empty environment variables
It appears the CRT and OS each have a copy of the environment. mingw_putenv() fools the CRT into accepting an empty environment variable by calling _putenv("V=0") then truncating the new value by hand. But _putenv() also updates the OS environment with the fake 'V=0' value. Commit 5b48ca53b (win32: pass NULL to spawnve, not environ) resulted in this fake value being used and hence empty variables getting the value '0'. - Add a call to SetEnvironmentVariable() in mingw_putenv() to update the OS environment. - Restore the use of NULL environment pointers in mingw_spawnvp(). - Add a test. (GitHub issue #250)
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions