diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 82e478905b..bea726c0fc 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -29,6 +29,7 @@ option(BUILD_LOGTAIL_SHARED_LIBRARY "Build Logtail shared library") option(ENABLE_ENTERPRISE "enable enterprise feature") cmake_dependent_option(ENABLE_COMPATIBLE_MODE "Build Logtail in compatible mode (for low version Linux)" OFF "LINUX" OFF) cmake_dependent_option(ENABLE_STATIC_LINK_CRT "Build Logtail by linking CRT statically" OFF "LINUX" OFF) +cmake_dependent_option(ENABLE_CORP_FEATURE "Enable corp feature" OFF "ENABLE_ENTERPRISE" OFF) option(WITHOUTGDB "Build Logtail without gdb") option(BUILD_LOGTAIL_UT "Build unit test for Logtail") @@ -36,6 +37,10 @@ if (ENABLE_ENTERPRISE) message(STATUS "Enable Enterprise Feature.") add_definitions(-D__ENTERPRISE__) include(${CMAKE_CURRENT_SOURCE_DIR}/enterprise_options.cmake) + if (ENABLE_CORP_FEATURE) + message(STATUS "Enable Corp Feature.") + add_definitions(-D__CORP__) + endif () else () include(${CMAKE_CURRENT_SOURCE_DIR}/options.cmake) endif () diff --git a/core/app_config/AppConfig.cpp b/core/app_config/AppConfig.cpp index 0b101fe9c8..5a7497c81d 100644 --- a/core/app_config/AppConfig.cpp +++ b/core/app_config/AppConfig.cpp @@ -183,7 +183,11 @@ AppConfig::AppConfig() { mNoInotify = false; mSendDataPort = 80; mShennongSocket = true; - // mInotifyBlackList.insert("/tmp"); +#ifdef __CORP__ + mInotifyBlackList.insert("/tmp"); // The constant creation and deletion of files in the /tmp directory by Pangu 2.0 + // may lead to increased resource consumption and system fluctuations for iLogtail + // which rely on inotify_add_watch and inotify_rm_watch for filesystem monitoring. +#endif mPurageContainerMode = false; mForceQuitReadTimeout = 7200;