summaryrefslogtreecommitdiffstats
path: root/units
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2024-05-31 17:40:12 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2024-06-03 17:30:54 +0200
commitd6243ebeddec488299efbf6a5b3c840a42c69eb4 (patch)
tree41c47f84c59c45119ea38ce1af042dd61d7c90c8 /units
parentdocs: fix escaped $ in CGroup Interface (diff)
downloadsystemd-d6243ebeddec488299efbf6a5b3c840a42c69eb4.tar.xz
systemd-d6243ebeddec488299efbf6a5b3c840a42c69eb4.zip
journald: enable persistent FD Store to fix logging during soft-reboot
A unit with StandardOutput=journal (the default) will get its stdout/stderr sockets disconnected when journald stops, as the file descriptors on journald's side are not preserved (it works on restart, as the FD Store keeps them open during restarts). Set FileDescriptorStorePreserve=yes so that the journal FD's stay open during a soft reboot, and applications don't get broken stdout/stderr.
Diffstat (limited to 'units')
-rw-r--r--units/systemd-journald.service.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/units/systemd-journald.service.in b/units/systemd-journald.service.in
index 96362f5730..4404af963b 100644
--- a/units/systemd-journald.service.in
+++ b/units/systemd-journald.service.in
@@ -32,6 +32,8 @@ IgnoreOnIsolate=yes
DeviceAllow=char-* rw
ExecStart={{LIBEXECDIR}}/systemd-journald
FileDescriptorStoreMax=4224
+# Ensure services using StandardOutput=journal do not break when journald is stopped
+FileDescriptorStorePreserve=yes
ImportCredential=journal.*
IPAddressDeny=any
LockPersonality=yes