diff options
author | Ron Yorston <rmy@pobox.com> | 2022-05-08 11:05:30 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2022-05-08 11:05:30 +0100 |
commit | 3194a475deb5e3e9e7aef680d9bf5fb0a63d551a (patch) | |
tree | 3f67439af8aca8b754d0a1c8146d5118b6bd83ae /include | |
parent | dc6dbbd9601aeaa9f715b2ea8ec128e6b7846eb9 (diff) | |
download | busybox-w32-3194a475deb5e3e9e7aef680d9bf5fb0a63d551a.tar.gz busybox-w32-3194a475deb5e3e9e7aef680d9bf5fb0a63d551a.tar.bz2 busybox-w32-3194a475deb5e3e9e7aef680d9bf5fb0a63d551a.zip |
ash: export certain variables to the environment immediately
The environment variables BB_OVERRIDE_APPLETS, BB_SKIP_ANSI_EMULATION
and BB_SYSTEMROOT affect of the behaviour of the shell itself.
Setting them as shell variables is insufficient for them to affect
the current shell.
When these three variables are exported from the shell they are
now placed in the environment immediately. Conversely, when
they're unset or unexported they're removed from the environment.
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/libbb.h b/include/libbb.h index 482fcce0c..6d6fc28f0 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -2360,7 +2360,11 @@ extern const char bb_busybox_exec_path[] ALIGN1; | |||
2360 | #define BB_PATH_ROOT_PATH "PATH=/sbin;/usr/sbin;/bin;/usr/bin" BB_ADDITIONAL_PATH | 2360 | #define BB_PATH_ROOT_PATH "PATH=/sbin;/usr/sbin;/bin;/usr/bin" BB_ADDITIONAL_PATH |
2361 | #define PATH_SEP ';' | 2361 | #define PATH_SEP ';' |
2362 | #define PATH_SEP_STR ";" | 2362 | #define PATH_SEP_STR ";" |
2363 | extern const char bb_skip_ansi_emulation[] ALIGN1; | 2363 | extern const char bbvar[] ALIGN1; |
2364 | #define bbafter(p) (p + sizeof(#p)) | ||
2365 | #define BB_OVERRIDE_APPLETS bbvar | ||
2366 | #define BB_SKIP_ANSI_EMULATION bbafter(BB_OVERRIDE_APPLETS) | ||
2367 | #define BB_SYSTEMROOT bbafter(BB_SKIP_ANSI_EMULATION) | ||
2364 | #endif | 2368 | #endif |
2365 | extern const char bb_PATH_root_path[] ALIGN1; /* BB_PATH_ROOT_PATH */ | 2369 | extern const char bb_PATH_root_path[] ALIGN1; /* BB_PATH_ROOT_PATH */ |
2366 | #define bb_default_root_path (bb_PATH_root_path + sizeof("PATH")) | 2370 | #define bb_default_root_path (bb_PATH_root_path + sizeof("PATH")) |