Set exec label of dotnet-launcher to "User"
authorWoongsuk Cho <ws77.cho@samsung.com>
Wed, 18 Mar 2020 06:01:23 +0000 (15:01 +0900)
committer이형주/Common Platform Lab(SR)/Staff Engineer/삼성전자 <leee.lee@samsung.com>
Wed, 18 Mar 2020 09:45:43 +0000 (18:45 +0900)
To attach diagnostics process to app process, exec label should be set to "User".
Additionally, log redirection (to dlog) is turned off for corerun mode.

NativeLauncher/launcher/dotnet/dotnet_launcher.cc
NativeLauncher/launcher/dotnet/dotnet_launcher.h
NativeLauncher/launcher/main.cc
dotnet-launcher.manifest

index ec595ae..aa8a8e9 100644 (file)
@@ -311,6 +311,11 @@ CoreRuntime::CoreRuntime(const char* mode) :
        }
 }
 
+void CoreRuntime::setLogManager(bool enable)
+{
+       __enableLogManager = enable;
+}
+
 CoreRuntime::~CoreRuntime()
 {
        // workaround : to prevent crash while process terminate on profiling mode,
index 704070b..b7511e5 100644 (file)
@@ -33,6 +33,7 @@ class CoreRuntime
                int initialize(bool standalone);
                void dispose();
                int launch(const char* appId, const char* root, const char* path, int argc, char* argv[]);
+               void setLogManager(bool enable);
 
        private:
 
@@ -51,6 +52,7 @@ class CoreRuntime
                bool __initialized;
                bool __enableLogManager;
                bool __isProfileMode;
+
 };
 
 }  // dotnetcore
index f09705b..ced3220 100644 (file)
@@ -84,6 +84,9 @@ extern "C" int realMain(int argc, char *argv[], const char* mode)
                snprintf(appId, 16, "%s", "dotnet-launcher");
                appRoot = baseName(argv[1]);
 
+               // diable log redirection to dlog.
+               runtime->setLogManager(false);
+
                if (runtime->initialize(true) != 0) {
                        _ERR("Failed to initialize");
                        return 1;
index 0f2e9fc..f02c64c 100644 (file)
@@ -4,5 +4,6 @@
     </request>
     <assign>
         <filesystem path="/opt/usr/dotnet" label="System::Shared" type="transmutable" />
+        <filesystem path="/usr/bin/dotnet-launcher" exec_label="User" />
     </assign>
 </manifest>