aboutsummaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2018-12-15 15:01:53 +0000
committerRon Yorston <rmy@pobox.com>2018-12-15 15:39:28 +0000
commit65189dacb44708743313c81ec1ccaff87a68be8d (patch)
treeb1330575c61bce5adc7d5be815490ac7cb431852 /win32
parenta236242374daf911a01e998fabb1cc1268b2be7b (diff)
downloadbusybox-w32-65189dacb44708743313c81ec1ccaff87a68be8d.tar.gz
busybox-w32-65189dacb44708743313c81ec1ccaff87a68be8d.tar.bz2
busybox-w32-65189dacb44708743313c81ec1ccaff87a68be8d.zip
ash: fix local PATH assignments
The previous commit included code to use PATH values assigned to local variables: PATH=/new/path:$PATH new_binary It didn't work in the case when no fork was needed, for example: (PATH=/new/path:$PATH new_binary) because the call to listsetvar() freed the PATH value that was passed to shellexec(). The forking case only worked because the spawn_forkshell() mechanism in busybox-w32 didn't allow the PATH value to be freed. Rewrite the code so it works whether or not a fork is needed. The code would also work on POSIX systems. A cleaner solution could be extracted from dash commit cbb71a8 'eval: Add assignment built-in support again' but neither that nor the current patch are suitable for submission to upstream BusyBox. This one is preferred because it requires fewer changes from upstream.
Diffstat (limited to 'win32')
0 files changed, 0 insertions, 0 deletions