]> git.ipfire.org Git - thirdparty/systemd.git/commit
log: add new "prohibit_ipc" flag to logging system
authorLennart Poettering <lennart@poettering.net>
Wed, 24 Jan 2018 16:36:25 +0000 (17:36 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 24 Jan 2018 17:22:56 +0000 (18:22 +0100)
commitadf47c919abbd62e287ebaad9e2ade38ce66dcbf
tree1c2a64892c1535ba50d64f6dde6329958a5bb699
parent6fdb8de42fbd314f1d06019f9ba4c4a060898e5f
log: add new "prohibit_ipc" flag to logging system

If set, we'll avoid logging to any IPC log targets, i.e. syslog or the
journal, but allow stderr, kmsg, console logging.

This is useful as PID 1 wants to turn this off explicitly as long as the
journal is not up.

Previously we'd open/close the log stream to these services whenever
needed but this is incompatible with the "open_when_needed" logic
introduced in #6915, which might open the log streams whenever it likes,
including possibly inside of the child process we fork off that'll
become journald later on. Hence, let's make this all explicit, and
instead of managing when we open/close log streams add a boolean that
clearly prohibits the IPC targets when needed, so that opening can be
done at any time, but will honour this.

See: #7985
src/basic/log.c
src/basic/log.h