aboutsummaryrefslogtreecommitdiff
path: root/lib/env.c
AgeCommit message (Collapse)Author
2020-02-26Fix xclearenv() breakage pointed out by Derrick Pallas.Rob Landley
Toybox doesn't modify inherited environ[] (the same way we don't modify our inherited argv[]), so instead of freeing our allocated environ[] when we want to clear it we need to allocate a new environ[] in the else path (at a length compatible with the existing plumbing's add stride), set the first entry of _that_ to 0, and set toys.envc = 1 to record it's an alloced environ.
2020-01-16The expand should expand.Rob Landley
2020-01-03Only free the environment variables we didn't inherit from exec.Rob Landley
2019-12-12Next round of toysh work, with associated lib plumbing.Rob Landley
2019-05-03Add a couple comments.Rob Landley
2019-05-03env: fix case where a variable is replaced.Elliott Hughes
Found when trying to update the toybox prebuilt used for the Android build. Also add the corresponding test.
2019-04-20Add xunsetenv() for the error checking.Rob Landley
2019-04-20New xsetenv() plumbing (repeatedly set same environment variables withoutRob Landley
leaking memory), and mod env command to test it.