aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c
index a809bf181..54c299d7e 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -21,7 +21,9 @@
21 * 21 *
22 * - Environment variables from Windows will all be turned to uppercase. 22 * - Environment variables from Windows will all be turned to uppercase.
23 * - PATH accepts both ; and : as separator, but can't be mixed 23 * - PATH accepts both ; and : as separator, but can't be mixed
24 * - command without ".exe" is still understood as executable (option to turn off?) 24 * - command without ".exe" extension is still understood as executable
25 * - shell scripts on the path are detected by the presence of '#!';
26 * the path to the interpreter is ignored, PATH is searched to find it
25 * - both / and \ are supported in PATH. Usually you must use / 27 * - both / and \ are supported in PATH. Usually you must use /
26 * - trap/job does not work 28 * - trap/job does not work
27 * - /dev/null is supported for redirection 29 * - /dev/null is supported for redirection
@@ -12947,7 +12949,16 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path)
12947 if (stat(fullname, &statb) < 0) { 12949 if (stat(fullname, &statb) < 0) {
12948 if (errno != ENOENT && errno != ENOTDIR) 12950 if (errno != ENOENT && errno != ENOTDIR)
12949 e = errno; 12951 e = errno;
12950 goto loop; 12952 fullname[len] = '\0';
12953 if (stat(fullname, &statb) < 0) {
12954 if (errno != ENOENT && errno != ENOTDIR)
12955 e = errno;
12956 goto loop;
12957 }
12958 if (!execable_file(fullname)) {
12959 e = ENOEXEC;
12960 goto loop;
12961 }
12951 } 12962 }
12952 } 12963 }
12953 fullname[len] = '\0'; 12964 fullname[len] = '\0';