diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2009-12-21 18:16:28 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2009-12-21 18:16:28 +0300 |
commit | 6d63272b5312cd145f034ccd573f275d2ea7ecc2 (patch) | |
tree | 3810fc0a3e2b3cba2ad8377333de76db72640366 /winsup/cygwin/exec.cc | |
parent | b2d6e5dfd3641b3cd1ffab814faa5f90b58a34c1 (diff) |
* exec.cc (execvp): Call find_exec with FE_NNF flag to enforce
a NULL return when executable isn't found in $PATH. Convert NULL
to "".
(execvpe): Ditto.
* spawn.cc (spawn_guts): Return with EFAULT if prog_arg is NULL.
Return with ENOENT if prog_arg is empty string. Add a comment.
Diffstat (limited to 'winsup/cygwin/exec.cc')
-rw-r--r-- | winsup/cygwin/exec.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/exec.cc b/winsup/cygwin/exec.cc index 131439fbc..b1fd52783 100644 --- a/winsup/cygwin/exec.cc +++ b/winsup/cygwin/exec.cc @@ -86,14 +86,14 @@ extern "C" int execvp (const char *path, char * const *argv) { path_conv buf; - return execv (find_exec (path, buf), argv); + return execv (find_exec (path, buf, "PATH=", FE_NNF) ?: "", argv); } extern "C" int execvpe (const char *path, char * const *argv, char *const *envp) { path_conv buf; - return execve (find_exec (path, buf), argv, envp); + return execve (find_exec (path, buf, "PATH=", FE_NNF) ?: "", argv, envp); } extern "C" int |