From 9418aaf0418f7b19a7b904d9387d627934aa3c88 Mon Sep 17 00:00:00 2001 From: Junghak Sung Date: Wed, 15 Mar 2023 16:39:30 +0900 Subject: [PATCH] Fix an error on dlog-redirection When both stdout and stderr are set as dlog, log tag and priority of stderr is not set properly. Change-Id: Ia14de6aeff3828aa0d6a27210fa96c53ee577c8d Signed-off-by: Junghak Sung Signed-off-by: Chanwoo Choi --- src/core/execute.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/execute.c b/src/core/execute.c index b8eff40..44877b4 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -567,6 +567,10 @@ static bool can_inherit_stderr_from_stdout( if (IN_SET(e, EXEC_OUTPUT_FILE, EXEC_OUTPUT_FILE_APPEND)) return streq_ptr(context->stdio_file[STDOUT_FILENO], context->stdio_file[STDERR_FILENO]); + /* Returns false if STDERR output is redirected to dlog */ + if (IN_SET(e, EXEC_OUTPUT_DLOG, EXEC_OUTPUT_DLOG_OR_NULL, EXEC_OUTPUT_DLOG_OR_KMSG, EXEC_OUTPUT_DLOG_OR_JOURNAL)) + return false; + return true; } -- 2.7.4