Merge pull request #12009 from Elinvention/fork/execvp

Use execvp instead of execv to allow OS.execute() to search through PATH.
This commit is contained in:
Hein-Pieter van Braam 2017-10-12 09:54:08 +02:00 committed by GitHub
commit abe47eaa63

View file

@ -343,7 +343,7 @@ Error OS_Unix::execute(const String &p_path, const List<String> &p_arguments, bo
execvp(getprogname(), &args[0]);
}
#else
execv(p_path.utf8().get_data(), &args[0]);
execvp(p_path.utf8().get_data(), &args[0]);
#endif
// still alive? something failed..
fprintf(stderr, "**ERROR** OS_Unix::execute - Could not create child process while executing: %s\n", p_path.utf8().get_data());