Remove dlog fd check 65/260865/2
authorHwankyu Jhun <h.jhun@samsung.com>
Tue, 6 Jul 2021 04:57:25 +0000 (13:57 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Tue, 6 Jul 2021 08:32:49 +0000 (17:32 +0900)
Even if stdout fd is already redirected to dlog fd, calling dlog_connted_to()
is needed to set the log tag. This patch removes calling dlog_is_log_fd().

Change-Id: If9fe1f28a68cfa62f02927945136f67581cd0f17
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/lib/common/src/launchpad_common.c

index 16ec220..0a3eaac 100644 (file)
@@ -959,11 +959,6 @@ static int __redirect_stdout(const char *ident)
        int ret;
        int fd;
 
-       if (dlog_is_log_fd(STDOUT_FILENO)) {
-               _W("STDOUT_FILENO is using dlog fd");
-               return 0;
-       }
-
        ret = dlog_connect_fd(LOG_ID_APPS, STDOUT_FILENO, "STDOUT", DLOG_WARN);
        if (ret == 0) {
                _W("STDOUT_FILENO redirection is successful");
@@ -1000,11 +995,6 @@ static int __redirect_stderr(const char *ident)
        int ret;
        int fd;
 
-       if (dlog_is_log_fd(STDERR_FILENO)) {
-               _W("STDERR_FILENO is using dlog fd");
-               return 0;
-       }
-
        ret = dlog_connect_fd(LOG_ID_APPS, STDERR_FILENO, "STDERR", DLOG_ERROR);
        if (ret == 0) {
                _W("STDERR_FILENO redirection is successful");