From d1ee0cb4bdbd0b28f6543ae0dab37c70b6fb0fb1 Mon Sep 17 00:00:00 2001 From: jinwoo jeong Date: Fri, 26 Jan 2018 13:12:51 +0900 Subject: [PATCH] Initialize application path When the main process forks a zygote process, it refer to a file that executes itself. Thus if current process is started from wrt-loader, forked process also will start from wrt-loader. To prevent this situation, we need to specify a starting point. Change-Id: Ib67aacd1cfee415c824166a7278f4c673b987622 Signed-off-by: jinwoo jeong --- atom/app/atom_main_delegate.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/atom/app/atom_main_delegate.cc b/atom/app/atom_main_delegate.cc index 1490b8901..e102cc39a 100644 --- a/atom/app/atom_main_delegate.cc +++ b/atom/app/atom_main_delegate.cc @@ -19,6 +19,7 @@ #include "base/debug/stack_trace.h" #include "base/environment.h" #include "base/logging.h" +#include "base/path_service.h" #include "chrome/common/chrome_paths.h" #include "content/public/common/content_switches.h" #include "ui/base/l10n/l10n_util.h" @@ -113,6 +114,8 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) { void AtomMainDelegate::PreSandboxStartup() { brightray::MainDelegate::PreSandboxStartup(); + PathService::Override(base::FILE_EXE, base::FilePath("/usr/bin/electron")); + // Set google API key. std::unique_ptr env(base::Environment::Create()); if (!env->HasVar("GOOGLE_API_KEY")) -- 2.34.1