From 2aba945c95bcdd1fdedb77d6828ad726eaaa58c7 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 20 Jan 2011 11:09:21 +0000 Subject: * exec.cc: Include pinfo.h. * winf.h: Move definitions of _P_PATH_TYPE_EXEC and _P_MODE from here... * pinfo.h: ...to here. (_P_PATH_TYPE_EXEC): Redefine to be bigger than _P_SYSTEM. (_P_MODE): Redefine so as not to mask out _P_SYSTEM. * spawn.cc (spawnlp): Add _P_PATH_TYPE_EXEC flag in call to spawnve. (spawnlpe): Ditto. (spawnvp): Ditto. --- winsup/cygwin/spawn.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'winsup/cygwin/spawn.cc') diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 5f97f41..1b268e4 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -969,8 +969,8 @@ spawnlp (int mode, const char *file, const char *arg0, ...) va_end (args); - return spawnve (mode, find_exec (file, buf), (char * const *) argv, - cur_environ ()); + return spawnve (mode | _P_PATH_TYPE_EXEC, find_exec (file, buf), + (char * const *) argv, cur_environ ()); } extern "C" int @@ -993,7 +993,8 @@ spawnlpe (int mode, const char *file, const char *arg0, ...) envp = va_arg (args, const char * const *); va_end (args); - return spawnve (mode, find_exec (file, buf), (char * const *) argv, envp); + return spawnve (mode | _P_PATH_TYPE_EXEC, find_exec (file, buf), + (char * const *) argv, envp); } extern "C" int @@ -1006,7 +1007,8 @@ extern "C" int spawnvp (int mode, const char *file, const char * const *argv) { path_conv buf; - return spawnve (mode, find_exec (file, buf), argv, cur_environ ()); + return spawnve (mode | _P_PATH_TYPE_EXEC, find_exec (file, buf), argv, + cur_environ ()); } extern "C" int -- cgit v1.1