diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-03-28 11:05:46 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-03-30 11:45:05 +0200 |
commit | 65e179a1e7021ab655c07dc392d5dd6fba2d2acb (patch) | |
tree | 7b460ed7fd3c049be03c9d7e996a2737b346c33f /man | |
parent | 5ccf06074abfd53e7f580764137eb17542830928 (diff) | |
download | systemd-65e179a1e7021ab655c07dc392d5dd6fba2d2acb.tar.gz |
tmpfiles: Try to take a BSD lock on files as well
Similar to what we do for directories, just before we remove a file,
let's try to take a BSD lock on it. If that fails, skip removing the
file.
Diffstat (limited to 'man')
-rw-r--r-- | man/systemd-tmpfiles.xml | 4 | ||||
-rw-r--r-- | man/tmpfiles.d.xml | 12 |
2 files changed, 9 insertions, 7 deletions
diff --git a/man/systemd-tmpfiles.xml b/man/systemd-tmpfiles.xml index c2e32f9f3d..49eda985b4 100644 --- a/man/systemd-tmpfiles.xml +++ b/man/systemd-tmpfiles.xml @@ -131,7 +131,9 @@ directories marked with <varname>D</varname> or <varname>R</varname>, and files or directories themselves marked with <varname>r</varname> or <varname>R</varname> are - removed.</para></listitem> + removed unless an exclusive or shared BSD lock is taken on them (see <citerefentry + project='man-pages'><refentrytitle>flock</refentrytitle><manvolnum>2</manvolnum></citerefentry>). + </para></listitem> </varlistentry> <varlistentry> diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml index b50423dc77..a23b9c8946 100644 --- a/man/tmpfiles.d.xml +++ b/man/tmpfiles.d.xml @@ -647,13 +647,13 @@ w- /proc/sys/vm/swappiness - - - - 10</programlisting></para> # an hour ago in "/tmp/foo/bar", are subject to time-based cleanup. d /tmp/foo/bar - - - - bmA:1h -</programlisting></para> - <para>Note that while the aging algorithm is run a 'shared' BSD file lock (see <citerefentry + <para>Note that while the aging algorithm is run an exclusive BSD file lock (see <citerefentry project='man-pages'><refentrytitle>flock</refentrytitle><manvolnum>2</manvolnum></citerefentry>) is - taken on each directory the algorithm descends into (and each directory below that, and so on). If the - aging algorithm finds a lock is already taken on some directory, it (and everything below it) is - skipped. 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 and everything below it is disabled.</para> + taken on each directory/file the algorithm decides to remove. If the aging algorithm finds a lock ( + shared or exclusive) is already taken on some directory/file, it (and everything below it) is skipped. + 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> </refsect2> <refsect2> |