From c9eed3b7313c8dbe9f0d78723f0d14083dcda3c7 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Thu, 11 Nov 2021 23:53:49 +0900 Subject: [PATCH] Revert "Write socket status to Id file" This reverts commit c947298db984eb156a7781365029e5ca2667ffbd. Change-Id: I4cd50ad35167858be3a9fee82874f211dea4bcb5 --- src/launch.cc | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/launch.cc b/src/launch.cc index 11d375c..74e30fd 100644 --- a/src/launch.cc +++ b/src/launch.cc @@ -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; -- 2.7.4