Initialize application path 52/168352/3
authorjinwoo jeong <jw00.jeong@samsung.com>
Fri, 26 Jan 2018 04:12:51 +0000 (13:12 +0900)
committerjaekuk lee <juku1999@samsung.com>
Mon, 26 Feb 2018 06:50:45 +0000 (06:50 +0000)
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 <jw00.jeong@samsung.com>
atom/app/atom_main_delegate.cc

index 1490b89..e102cc3 100644 (file)
@@ -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<base::Environment> env(base::Environment::Create());
   if (!env->HasVar("GOOGLE_API_KEY"))