diff options
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/sh.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Userland/sh.cpp b/Userland/sh.cpp index 9ac70d36f8..c5795853eb 100644 --- a/Userland/sh.cpp +++ b/Userland/sh.cpp @@ -263,10 +263,20 @@ static int try_exec(const char* path, char** argv) int ret = execve(path, argv, environ); assert(ret < 0); + { const char* search_path = "/bin"; char pathbuf[128]; sprintf(pathbuf, "%s/%s", search_path, argv[0]); ret = execve(pathbuf, argv, environ); + assert(ret < 0); + } + + { + const char* search_path = "/usr/bin"; + char pathbuf[128]; + sprintf(pathbuf, "%s/%s", search_path, argv[0]); + ret = execve(pathbuf, argv, environ); + } if (ret == -1) return -1; return ret; |