From 53391c29f7647abaab94965a8f733534d88def80 Mon Sep 17 00:00:00 2001 From: Changgyu Choi Date: Fri, 2 Apr 2021 10:38:27 +0900 Subject: [PATCH] Revert "Redirect stdout to dlog" This reverts commit fc56cf98b0757f132574535d6017b14f808bd807. Change-Id: I0f144d1f16b05b43994b4e30b3adf3e7848cade7 Signed-off-by: Changgyu Choi --- CMakeLists.txt | 3 +-- packaging/launchpad.spec | 1 - src/app-defined-loader/CMakeLists.txt | 1 - src/launchpad-loader/CMakeLists.txt | 1 - src/launchpad-process-pool/CMakeLists.txt | 1 - src/lib/common/src/launchpad_common.c | 18 +----------------- src/lib/launchpad/CMakeLists.txt | 1 - 7 files changed, 2 insertions(+), 24 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 063cd75..5a8e0f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,9 +54,8 @@ PKG_CHECK_MODULES(BUNDLE_DEPS REQUIRED bundle) PKG_CHECK_MODULES(BUXTON2_DEPS REQUIRED buxton2) PKG_CHECK_MODULES(DBUS_DEPS REQUIRED dbus-1) PKG_CHECK_MODULES(DLOG_DEPS REQUIRED dlog) -PKG_CHECK_MODULES(DLOG_REDIRECT_STDOUT_DEPS REQUIRED dlog-redirect-stdout) -PKG_CHECK_MODULES(ECORE_CORE_DEPS REQUIRED ecore-core) PKG_CHECK_MODULES(ECORE_DEPS REQUIRED ecore) +PKG_CHECK_MODULES(ECORE_CORE_DEPS REQUIRED ecore-core) PKG_CHECK_MODULES(ELEMENTARY_DEPS REQUIRED elementary) PKG_CHECK_MODULES(GIO_DEPS REQUIRED gio-2.0) PKG_CHECK_MODULES(INIPARSER_DEPS REQUIRED iniparser) diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index fc1cafb..53747e3 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -17,7 +17,6 @@ BuildRequires: pkgconfig(bundle) BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(ecore) BuildRequires: pkgconfig(dlog) -BuildRequires: pkgconfig(dlog-redirect-stdout) BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(elementary) BuildRequires: pkgconfig(vconf) diff --git a/src/app-defined-loader/CMakeLists.txt b/src/app-defined-loader/CMakeLists.txt index d588f4d..a7fa8bb 100644 --- a/src/app-defined-loader/CMakeLists.txt +++ b/src/app-defined-loader/CMakeLists.txt @@ -29,7 +29,6 @@ APPLY_PKG_CONFIG(${TARGET_APP_DEFINED_LOADER} PUBLIC BUNDLE_DEPS DBUS_DEPS DLOG_DEPS - DLOG_REDIRECT_STDOUT_DEPS ECORE_DEPS ECORE_CORE_DEPS GIO_DEPS diff --git a/src/launchpad-loader/CMakeLists.txt b/src/launchpad-loader/CMakeLists.txt index b768262..091bba7 100644 --- a/src/launchpad-loader/CMakeLists.txt +++ b/src/launchpad-loader/CMakeLists.txt @@ -24,7 +24,6 @@ ENDIF(_TIZEN_FEATURE_PRELINK) APPLY_PKG_CONFIG(${TARGET_LAUNCHPAD_LOADER} PUBLIC DLOG_DEPS - DLOG_REDIRECT_STDOUT_DEPS ECORE_DEPS ELEMENTARY_DEPS SECURITY_MANAGER_DEPS diff --git a/src/launchpad-process-pool/CMakeLists.txt b/src/launchpad-process-pool/CMakeLists.txt index b0af4fe..70732ff 100644 --- a/src/launchpad-process-pool/CMakeLists.txt +++ b/src/launchpad-process-pool/CMakeLists.txt @@ -28,7 +28,6 @@ APPLY_PKG_CONFIG(${TARGET_LAUNCHPAD_PROCESS_POOL} PUBLIC BUNDLE_DEPS DBUS_DEPS DLOG_DEPS - DLOG_REDIRECT_STDOUT_DEPS GIO_DEPS INIPARSER_DEPS LIBCAP_DEPS diff --git a/src/lib/common/src/launchpad_common.c b/src/lib/common/src/launchpad_common.c index 2f881b4..7c4ab6f 100644 --- a/src/lib/common/src/launchpad_common.c +++ b/src/lib/common/src/launchpad_common.c @@ -41,7 +41,6 @@ #include #include #include -#include #include "launchpad_common.h" #include "launchpad_types.h" @@ -955,17 +954,9 @@ static int __redirect_stdin(void) static int __redirect_stdout(const char *ident) { - char buf[512]; int ret; int fd; - snprintf(buf, sizeof(buf), "STDOUT_%s", ident); - ret = connect_dlog(LOG_ID_MAIN, STDOUT_FILENO, buf, DLOG_INFO); - if (ret != 0) - _W("connect_dlog() is failed. error(%d)", ret); - else - return 0; - fd = sd_journal_stream_fd(ident, LOG_INFO, 0); if (fd < 0) { if (fd != -ENOENT) @@ -993,17 +984,9 @@ static int __redirect_stdout(const char *ident) static int __redirect_stderr(const char *ident) { - char buf[512]; int ret; int fd; - snprintf(buf, sizeof(buf), "STDERR_%s", ident); - ret = connect_dlog(LOG_ID_MAIN, STDERR_FILENO, buf, DLOG_WARN); - if (ret != 0) - _W("connect_dlog() is failed. error(%d)", ret); - else - return 0; - fd = sd_journal_stream_fd(ident, LOG_WARNING, 0); if (fd < 0) { if (fd != -ENOENT) @@ -1027,6 +1010,7 @@ static int __redirect_stderr(const char *ident) close(fd); return ret; + } int _setup_stdio(const char *ident) diff --git a/src/lib/launchpad/CMakeLists.txt b/src/lib/launchpad/CMakeLists.txt index 053920b..d43ea34 100644 --- a/src/lib/launchpad/CMakeLists.txt +++ b/src/lib/launchpad/CMakeLists.txt @@ -18,7 +18,6 @@ APPLY_PKG_CONFIG(${TARGET_LAUNCHPAD} PUBLIC BUXTON2_DEPS DBUS_DEPS DLOG_DEPS - DLOG_REDIRECT_STDOUT_DEPS LIBCAP_DEPS LIBSYSTEMD_DEPS LIBTZPLATFORM_CONFIG_DEPS -- 2.7.4