Use execvpe instead of execve in omnitrace-sample (#187)
* Use execvpe instead of execve in omnitrace-sample - previous implementation preferred exe in PATH over exe in PWD - 'p' variants of exec duplicate the actions of the shell in searching for an executable file if the specified filename does not contain a slash character * OpenMPI oversubscribe arg in testing
此提交包含在:
@@ -56,11 +56,10 @@ main(int argc, char** argv)
|
||||
|
||||
if(!_argv.empty())
|
||||
{
|
||||
std::string _argv0 = get_command(_argv[0]);
|
||||
print_command(_argv);
|
||||
_argv.emplace_back(nullptr);
|
||||
_env.emplace_back(nullptr);
|
||||
|
||||
return execve(_argv0.c_str(), _argv.data(), _env.data());
|
||||
return execvpe(_argv.front(), _argv.data(), _env.data());
|
||||
}
|
||||
}
|
||||
|
||||
新增問題並參考
封鎖使用者