Tolerant logger creation failure
Fix resetting a background compton Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
39faac0f83
commit
fc2353d186
|
@ -2613,11 +2613,11 @@ session_init(int argc, char **argv, Display *dpy, const char *config_file,
|
||||||
|
|
||||||
log_init_tls();
|
log_init_tls();
|
||||||
auto stderr_logger = stderr_logger_new();
|
auto stderr_logger = stderr_logger_new();
|
||||||
if (!stderr_logger) {
|
if (stderr_logger) {
|
||||||
fprintf(stderr, "Cannot create any logger, giving up.\n");
|
// stderr logger might fail to create if we are already
|
||||||
abort();
|
// daemonized.
|
||||||
|
log_add_target_tls(stderr_logger);
|
||||||
}
|
}
|
||||||
log_add_target_tls(stderr_logger);
|
|
||||||
|
|
||||||
// Allocate a session and copy default values into it
|
// Allocate a session and copy default values into it
|
||||||
session_t *ps = cmalloc(session_t);
|
session_t *ps = cmalloc(session_t);
|
||||||
|
|
Loading…
Reference in New Issue