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

Unified Diff: services/service_manager/runner/host/service_process_launcher.cc

Issue 2651953002: Revert of [Service Manager] Get rid of dynamic service discovery (Closed)
Patch Set: Created 3 years, 11 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
Index: services/service_manager/runner/host/service_process_launcher.cc
diff --git a/services/service_manager/runner/host/service_process_launcher.cc b/services/service_manager/runner/host/service_process_launcher.cc
index 4bc8a07f529741bec2613ca95acc4d735fd3c802..06f6a52cc3e7ff2fdfddf9637a4d950b0e5707da 100644
--- a/services/service_manager/runner/host/service_process_launcher.cc
+++ b/services/service_manager/runner/host/service_process_launcher.cc
@@ -131,6 +131,24 @@
}
base::LaunchOptions options;
+
+ base::FilePath exe_dir;
+ base::PathService::Get(base::DIR_EXE, &exe_dir);
+ options.current_directory = exe_dir;
+
+ // The service should look for ICU data next to the service runner's
+ // executable rather than its own.
+ child_command_line->AppendSwitchPath(switches::kIcuDataDir, exe_dir);
+
+#if defined(OS_POSIX)
+ // We need the dynamic loader to be able to locate things like libbase.so
+ // in component builds, as well as some other dynamic runtime dependencies in
+ // other build environments (e.g. libosmesa.so). For this we set
+ // LD_LIBRARY_PATH to the service runner's executable path where such
+ // artifacts are typically expected to reside.
+ options.environ["LD_LIBRARY_PATH"] = exe_dir.value();
+#endif
+
#if defined(OS_WIN)
options.handles_to_inherit = &handle_passing_info_;
#if defined(OFFICIAL_BUILD)

Powered by Google App Engine
This is Rietveld 408576698