diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-06-20 12:59:24 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-06-20 15:22:47 +0200 |
commit | dbc3cc8b832a7648f68b69e1322563d64cffd9c4 (patch) | |
tree | 11168c4e1bd97f68d612e118271bcd748b9e35d3 /man/tmpfiles.d.xml | |
parent | tmpfiles: Don't log about harmless errors when trying to lock file (diff) | |
download | systemd-dbc3cc8b832a7648f68b69e1322563d64cffd9c4.tar.xz systemd-dbc3cc8b832a7648f68b69e1322563d64cffd9c4.zip |
tmpfiles: Add note to man page about guaranteed cleanup for files/directories
Diffstat (limited to 'man/tmpfiles.d.xml')
-rw-r--r-- | man/tmpfiles.d.xml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml index ef0bb1f7f8..495315d55c 100644 --- a/man/tmpfiles.d.xml +++ b/man/tmpfiles.d.xml @@ -661,6 +661,14 @@ d /tmp/foo/bar - - - bmA:1h -</programlisting></para> Applications may use this to temporarily exclude certain directory subtrees from the aging algorithm: the applications can take a BSD file lock themselves, and as long as they keep it aging of the directory/file and everything below it is disabled.</para> + + <para>This behavior can be used to ensure guaranteed cleanup of files or directories whose lifetime + should be aligned with the process that created them by having that process create them in a location + monitored by <command>systemd-tmpfiles</command> with an age of <literal>0</literal>, and having the + process immediately lock the directory or file before using it. Because the BSD lock is process + specific, the file is guaranteed to be unlocked as soon as the process exits, meaning that even if the + process crashes, those files and directories will be unlocked and cleaned up by + <command>systemd-tmpfiles</command>.</para> </refsect2> <refsect2> |