Commit 970f6a80 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Nikolai Kosjar

CrashHandler: Use exec variants that search in path

Executable can be non-absolute

Change-Id: Ibb0a4385ef0d763fe2aae2c8ac0b205328a64870
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
parent b0d9dd0b
......@@ -246,9 +246,9 @@ void CrashHandler::runCommand(QStringList commandLine, QStringList environment,
qFatal("%s: freopen() failed for stderr: %s.\n.", Q_FUNC_INFO, strerror(errno));
if (environment.isEmpty())
execv(argv[0], argv.data());
execvp(argv[0], argv.data());
else
execve(argv[0], argv.data(), envp.data());
execvpe(argv[0], argv.data(), envp.data());
_exit(EXIT_FAILURE);
} default: // parent
if (waitMode == WaitForExit) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment