diff options
author | Ron Yorston <rmy@pobox.com> | 2024-02-08 13:13:08 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2024-02-08 13:13:08 +0000 |
commit | c44f23f4acbbd854eccd962110e41343d8f03296 (patch) | |
tree | 9c2f2f837ef8ea0863aa5b3827cb3c4e0a43a647 | |
parent | ad4bd5bbd53363eede5e6af46c6b308278aad47f (diff) | |
download | busybox-w32-c44f23f4acbbd854eccd962110e41343d8f03296.tar.gz busybox-w32-c44f23f4acbbd854eccd962110e41343d8f03296.tar.bz2 busybox-w32-c44f23f4acbbd854eccd962110e41343d8f03296.zip |
ash: allow nofork applets in Windows on ARM + UCRT
Commit ea8742bc16 (ash: workaround environment issue in Windows
on ARM) prevented nofork applets from being run without a fork
in standalone shell mode in Windows on ARM. This was due to a
deficiency in the handling of the 'environ' global.
However, the problem is specific to MSVCRT. If the target is
UCRT nofork applets can be made to work without a fork.
-rw-r--r-- | shell/ash.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c index 5b73c3c66..31d3c1013 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -11665,7 +11665,8 @@ evalcommand(union node *cmd, int flags) | |||
11665 | //TODO: find a better solution for Windows on ARM than ignoring NOFORK | 11665 | //TODO: find a better solution for Windows on ARM than ignoring NOFORK |
11666 | #if ENABLE_FEATURE_SH_STANDALONE \ | 11666 | #if ENABLE_FEATURE_SH_STANDALONE \ |
11667 | && ENABLE_FEATURE_SH_NOFORK \ | 11667 | && ENABLE_FEATURE_SH_NOFORK \ |
11668 | && NUM_APPLETS > 1 && !(defined(_ARM64_) && ENABLE_PLATFORM_MINGW32) | 11668 | && NUM_APPLETS > 1 \ |
11669 | && !(defined(_ARM64_) && !defined(_UCRT) && ENABLE_PLATFORM_MINGW32) | ||
11669 | /* (1) BUG: if variables are set, we need to fork, or save/restore them | 11670 | /* (1) BUG: if variables are set, we need to fork, or save/restore them |
11670 | * around run_nofork_applet() call. | 11671 | * around run_nofork_applet() call. |
11671 | * (2) Should this check also be done in forkshell()? | 11672 | * (2) Should this check also be done in forkshell()? |