]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: add FileDescriptorStorePreserve=on-success option 42160/head
authorLuca Boccassi <luca.boccassi@gmail.com>
Mon, 18 May 2026 14:47:32 +0000 (15:47 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 21 May 2026 09:14:08 +0000 (10:14 +0100)
commit67dea1409b7083b6fa78d7adb752d13ce3e0909b
treee8b66c896c05f734214ca10073abcf135f896497
parent00276b963c54f2025085f313b80d9b70bd57cca6
core: add FileDescriptorStorePreserve=on-success option

Currently with FileDescriptorStorePreserve=yes the FD store is kept around
regardless of what happens to a unit, which is useful in many cases. But in
some cases, for example when complex services crash horribly, it's hard to
reason about what was in the intermediate state, and it's better to start
fresh.

Add a new 'on-success' option for the FileDescriptorStorePreserve= setting
that keeps it around only for as long as the unit doesn't go to a persistently
failed state.

This is especially useful in combination with LUO, where we don't want to
keep around LUO sessions created by units that then proceeded to crash and
burn, and might be in a bad state afterwards.
docs/FILE_DESCRIPTOR_STORE.md
man/systemd.service.xml
src/core/execute.c
src/core/execute.h
src/core/luo.c
src/core/service.c
src/shared/varlink-io.systemd.Unit.c
test/units/TEST-13-NSPAWN.unpriv.sh
test/units/TEST-91-LIVEUPDATE.sh