Revert "Write socket status to Id file" 05/266405/1
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 11 Nov 2021 14:53:49 +0000 (23:53 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 11 Nov 2021 14:53:54 +0000 (23:53 +0900)
This reverts commit c947298db984eb156a7781365029e5ca2667ffbd.

Change-Id: I4cd50ad35167858be3a9fee82874f211dea4bcb5

src/launch.cc

index 11d375c..74e30fd 100644 (file)
@@ -99,27 +99,6 @@ int GetPreInitFd() {
   return fd;
 }
 
-void WriteStatusToIdFile(int status) {
-  const char* env_str = getenv("AUL_APPID");
-  if (env_str == nullptr) {
-    if (getuid() >= REGULAR_UID_MIN)
-      _W("Failed to get AUL_APPID");
-
-    return;
-  }
-
-  std::string path = "/run/aul/apps/" + std::to_string(getuid()) + "/" +
-      std::to_string(getpid()) + "/" +  std::string(env_str);
-  FILE* fp = fopen(path.c_str(), "w");
-  if (fp == nullptr) {
-    _E("fopen() is failed. path(%s), errno(%d)", path.c_str(), errno);
-    return;
-  }
-
-  fprintf(fp, "%d", status);
-  fclose(fp);
-}
-
 }  // namespace
 
 extern "C" int aul_is_initialized() {
@@ -230,7 +209,6 @@ extern "C" int aul_initialize() {
       return AUL_R_ECOMM;
     }
   }
-  WriteStatusToIdFile(1);
   aul_notify_start();
 
   aul_initialized = 1;