]> git.ipfire.org Git - thirdparty/systemd.git/commit
pid1: when we can't log to journal, remember our fallback log target
authorAlan Jenkins <alan.christopher.jenkins@gmail.com>
Fri, 26 Jan 2018 22:47:16 +0000 (22:47 +0000)
committerAlan Jenkins <alan.christopher.jenkins@gmail.com>
Fri, 26 Jan 2018 22:47:16 +0000 (22:47 +0000)
commitba307538994fb688284a13bb215267c3312bb5c7
treea34de1c8f7df742ef1be47e95ee0ec0319d5f461
parent4c6ceea77354d5cb3615be13408195adba7b2a78
pid1: when we can't log to journal, remember our fallback log target

If we have to force the logging to close the journal fd, then we can open
any fallback log target.  E.g. kmsg, if the target was the default
JOURNAL_OR_KMSG.

This is the behaviour I would expect from the documentation.  I couldn't
find any justification in the code, for why we would want to start dropping
log messages instead of sending them to the fallback target.

This means we will match the behaviour of processes which we fork and which
set `open_when_needed`, and with generators - which use
log_set_prohibit_ipc(true) - which we fork+exec during a reload.

IMO this illustrates that the log_open/log_close interface is too clunky.
So with the behaviour settled, I will refactor the interface in the next
commit :).
src/core/manager.c