aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2021-07-26 15:05:57 +0100
committerRon Yorston <rmy@pobox.com>2021-07-26 15:26:30 +0100
commit5c2241c4b32607f138824c3454b7b32b2916fd02 (patch)
tree49667c5bf5f9b99c534c8da30bd2e574b1975de0 /shell
parentc79f1302589885a6b5500c38c20f1cc5d00e006f (diff)
downloadbusybox-w32-5c2241c4b32607f138824c3454b7b32b2916fd02.tar.gz
busybox-w32-5c2241c4b32607f138824c3454b7b32b2916fd02.tar.bz2
busybox-w32-5c2241c4b32607f138824c3454b7b32b2916fd02.zip
win32: more efficient tests for executables
file_is_executable() calls access(2) and stat(2); in this case our WIN32 implementation also calls stat(2). Avoid this unnecessary duplication by copying the required test from the WIN32 access(2). In find_executable() it's possible to avoid calling file_is_executable() if add_win32_extension() returns TRUE as the latter will already have verified that the file is executable. Replace a call to file_is_executable() in the tab completion code with the equivalent tests, avoiding (up to) two calls to stat(2). These changes don't affect the size of the binary and should be faster.
Diffstat (limited to 'shell')
0 files changed, 0 insertions, 0 deletions