diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c index a446a6699..109473b97 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 |
@@ -12951,7 +12953,16 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path) | |||
12951 | if (stat(fullname, &statb) < 0) { | 12953 | if (stat(fullname, &statb) < 0) { |
12952 | if (errno != ENOENT && errno != ENOTDIR) | 12954 | if (errno != ENOENT && errno != ENOTDIR) |
12953 | e = errno; | 12955 | e = errno; |
12954 | goto loop; | 12956 | fullname[len] = '\0'; |
12957 | if (stat(fullname, &statb) < 0) { | ||
12958 | if (errno != ENOENT && errno != ENOTDIR) | ||
12959 | e = errno; | ||
12960 | goto loop; | ||
12961 | } | ||
12962 | if (!execable_file(fullname)) { | ||
12963 | e = ENOEXEC; | ||
12964 | goto loop; | ||
12965 | } | ||
12955 | } | 12966 | } |
12956 | } | 12967 | } |
12957 | fullname[len] = '\0'; | 12968 | fullname[len] = '\0'; |