From: Junghak Sung Date: Wed, 15 Mar 2023 07:39:30 +0000 (+0900) Subject: Fix an error on dlog-redirection X-Git-Tag: submit/tizen/20230428.093600~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9418aaf0418f7b19a7b904d9387d627934aa3c88;p=platform%2Fupstream%2Fsystemd.git 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 --- 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; }