summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHwankyu Jhun <h.jhun@samsung.com>2020-06-23 10:21:15 +0900
committerHwankyu Jhun <h.jhun@samsung.com>2020-06-23 10:21:15 +0900
commit9996f39b1d9d581fcb810dc0b031613637cd2f5d (patch)
tree68696a5097fa9a4e4c6810725fa04cdae53814d3
parent99464b08a3a13fd9e498a5d8d76c8bcb74047270 (diff)
downloadlaunchpad-9996f39b1d9d581fcb810dc0b031613637cd2f5d.tar.gz
launchpad-9996f39b1d9d581fcb810dc0b031613637cd2f5d.tar.bz2
launchpad-9996f39b1d9d581fcb810dc0b031613637cd2f5d.zip
Check the error value Before printing error logs
If the error value is -ENOENT(No such file or directory), the process doesn't print the error logs. Change-Id: I15548f966b4c28928f0f460c4be5a611df57503d Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
-rw-r--r--src/common/src/launchpad_common.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/common/src/launchpad_common.c b/src/common/src/launchpad_common.c
index d2bf965..fdb2455 100644
--- a/src/common/src/launchpad_common.c
+++ b/src/common/src/launchpad_common.c
@@ -950,7 +950,8 @@ static int __redirect_stdout(const char *ident)
fd = sd_journal_stream_fd(ident, LOG_INFO, 0);
if (fd < 0) {
- _W("sd_journal_stream_fd() is failed. error(%d)", fd);
+ if (fd != -ENOENT)
+ _W("sd_journal_stream_fd() is failed. error(%d)", fd);
return fd;
}
@@ -969,7 +970,8 @@ static int __redirect_stderr(const char *ident)
fd = sd_journal_stream_fd(ident, LOG_WARNING, 0);
if (fd < 0) {
- _W("sd_journal_stream_fd() is failed. error(%d)", fd);
+ if (fd != -ENOENT)
+ _W("sd_journal_stream_fd() is failed. error(%d)", fd);
return fd;
}