exec: search commands in the current directory first on OS/2

On OS/2, commands(executables) are searched in the current directory
before in $PATH.

    modified:   exec.c
This commit is contained in:
KO Myung-Hun 2016-12-19 15:50:58 +09:00
parent 20dbf6b45b
commit 89d461dd83
1 changed files with 6 additions and 0 deletions

6
exec.c
View File

@ -1315,6 +1315,12 @@ search_path(const char *name, const char *lpath,
goto search_path_err;
}
#ifdef __OS2__
/* look in a current directory first (OS/2 style) */
if (search_access(name, mode) == 0)
goto search_path_ok;
#endif
namelen = strlen(name) + 1;
Xinit(xs, xp, 128, ATEMP);