aboutsummaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2018-02-28 17:00:43 +0000
committerRon Yorston <rmy@pobox.com>2018-02-28 17:00:43 +0000
commit92dbd3c0932abbfb6814554603abd38e3eb9d953 (patch)
tree11ec318924d65796538a776422ab130d81b56752 /win32
parentb0a565de930df8dc4fd8f00cbfe3a585391cb05a (diff)
downloadbusybox-w32-92dbd3c0932abbfb6814554603abd38e3eb9d953.tar.gz
busybox-w32-92dbd3c0932abbfb6814554603abd38e3eb9d953.tar.bz2
busybox-w32-92dbd3c0932abbfb6814554603abd38e3eb9d953.zip
ash: changes to command resolution, execution and display
ash separates searching for commands from running them. Searching is performed in find_command(). The result of the search is stored in a hash table but not as the full path: the path is reconstructed in shellexec() by combining the directory and command name. In Windows the command name is insufficient, as the executable name may also include an extension. To resolve this we must ensure that extensions are processed in the same order in find_command, shellexec and any other places where command names are resolved into file names. The order used matches that of spawnve: .com, .exe, .bat, .cmd. Finally the bare filename with no additional extension The order has been made consistent: - in find_command for absolute paths and the Windows-specific path search; - in tryexec (which is called by shellexec) where an additional test that the file is executable has been added; - in the type and hash built-ins where the output has been modified to include the extension. Additionally, the code in tryexec to handle ENOEXEC errors from execve has been excluded. The rationale for the exec functions in POSIX [1] suggests the requirement to retry is a workaround for the lack of '#!' support on some platforms. [1] http://pubs.opengroup.org/onlinepubs/009695399/functions/exec.html
Diffstat (limited to 'win32')
0 files changed, 0 insertions, 0 deletions