mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 17:06:39 +09:00
core: Settle log target if we're going to be closing all fds
Whenever we're going to close all file descriptors, we tend to close the log and set it into open when needed mode. When this is done with the logging target set to LOG_TARGET_AUTO, we run into issues because for every logging call, we'll check if stderr is connected to the journal to determine where to send the logging message. This check obviously stops working when we close stderr, so we settle the log target before we do that so that we keep using the same logging target even after stderr is closed.
This commit is contained in:
@@ -54,6 +54,7 @@ void log_set_target(LogTarget target);
|
||||
void log_set_target_and_open(LogTarget target);
|
||||
int log_set_target_from_string(const char *e);
|
||||
LogTarget log_get_target(void) _pure_;
|
||||
void log_settle_target(void);
|
||||
|
||||
void log_set_max_level(int level);
|
||||
int log_set_max_level_from_string(const char *e);
|
||||
|
||||
Reference in New Issue
Block a user