aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2022-05-06 08:26:55 +0100
committerRon Yorston <rmy@pobox.com>2022-05-06 09:30:43 +0100
commit26ba73098e714459e3294679228a1d54eed14799 (patch)
tree5e5dda2adbf6577276baf372626465213fd2f1b9 /docs
parent3b5042430fc4b82d44e0430f9ecc21a9228d1651 (diff)
downloadbusybox-w32-26ba73098e714459e3294679228a1d54eed14799.tar.gz
busybox-w32-26ba73098e714459e3294679228a1d54eed14799.tar.bz2
busybox-w32-26ba73098e714459e3294679228a1d54eed14799.zip
win32: search PATH for missing Unix-style executables
Commit 41ef232fc5 (win32: use built-in applets for non-existent binaries with Unix-style paths) alters what happens when trying to find an executable. If all of the following apply: - the pathname starts with one of the standard directories for Unix executables (/bin, /usr/bin, /sbin, /usr/sbin); - the file isn't found relative to the system root; - the basename matches an applet then the applet is run. Further extend the procedure so that if the first two conditions are met and either: - the PREFER_APPLETS and SH_STANDALONE features are enabled and the basename *doesn't* match an applet or - the PREFER_APPLETS and SH_STANDALONE features are disabled then PATH is searched for the basename. This affects: - how interpreters and binaries are spawned by mingw_spawn_interpreter() and mingw_spawnvp(); - how 'which' and the shell search for binaries. Special steps need to be taken in the shell to avoid treating shell built-ins and functions as applets. As a consequence of this change: - An executable that isn't an applet, say curl.exe, can be run as /usr/bin/curl so long as it's in a directory in PATH. It doesn't have to be in C:/usr/bin. - If the PREFER_APPLETS and SH_STANDALONE features are disabled binaries can be run using paths referring to standard Unix directories even if they're installed elsewhere in PATH.
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions