From: Cheng Zhao Date: Thu, 5 Sep 2013 01:22:24 +0000 (+0800) Subject: Use environment variable to detect whether to run as node. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=88bdff583253bdc5be0688935c9c0aeb76144003;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Use environment variable to detect whether to run as node. --- diff --git a/app/atom_main.cc b/app/atom_main.cc index e868a63..2317c9a 100644 --- a/app/atom_main.cc +++ b/app/atom_main.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include #include #include "content/public/app/content_main.h" @@ -72,10 +73,9 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) { #include "app/atom_library_main.h" int main(int argc, const char* argv[]) { - if (argc > 1 && strcmp(argv[1], "--atom-child_process-fork") == 0) { - argv[1] = argv[0]; - return node::Start(argc - 1, const_cast(argv + 1)); - } + char* node_indicator = getenv("ATOM_SHELL_INTERNAL_RUN_AS_NODE"); + if (node_indicator != NULL && strcmp(node_indicator, "1") == 0) + return node::Start(argc, const_cast(argv)); return AtomMain(argc, argv); } diff --git a/vendor/node b/vendor/node index de1afc6..9fc9785 160000 --- a/vendor/node +++ b/vendor/node @@ -1 +1 @@ -Subproject commit de1afc6cc609ed37863b1b0e919357f96000c6c4 +Subproject commit 9fc97854c9395edea096464edfb1e0a3b68145fe