Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Unified Diff: base/process/launch_posix.cc

Issue 2338133005: Add real_path option to LaunchProcess (Closed)
Patch Set: Make real_path posix only Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/process/launch.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/launch_posix.cc
diff --git a/base/process/launch_posix.cc b/base/process/launch_posix.cc
index 5906d1d94ab4e3ca6d10d7dc6db6262670affeb7..e45604362511b4877236c5e856396d6420b1589e 100644
--- a/base/process/launch_posix.cc
+++ b/base/process/launch_posix.cc
@@ -487,7 +487,10 @@ Process LaunchProcess(const std::vector<std::string>& argv,
options.pre_exec_delegate->RunAsyncSafe();
}
- execvp(argv_cstr[0], argv_cstr.get());
+ const char* executable_path = !options.real_path.empty() ?
+ options.real_path.value().c_str() : argv_cstr[0];
+
+ execvp(executable_path, argv_cstr.get());
RAW_LOG(ERROR, "LaunchProcess: failed to execvp:");
RAW_LOG(ERROR, argv_cstr[0]);
« no previous file with comments | « base/process/launch.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698