aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2020-02-08 14:10:31 +0100
committerMichael Kerrisk <mtk.manpages@gmail.com>2020-02-08 14:10:31 +0100
commitf3aa51b217ff28380edae560c7129d3b7262ce36 (patch)
treee9400d7710eec4e891aaaa1c5a513116058202bc
parente15b10ba32414c50478bf6f4efec7537485e5196 (diff)
downloadman-pages-f3aa51b217ff28380edae560c7129d3b7262ce36.tar.gz
fcntl.2: Further tweaks to F_SEAL_FUTURE_WRITE text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man2/fcntl.214
1 files changed, 8 insertions, 6 deletions
diff --git a/man2/fcntl.2 b/man2/fcntl.2
index cb4445bb45..e74950cda7 100644
--- a/man2/fcntl.2
+++ b/man2/fcntl.2
@@ -1527,8 +1527,10 @@ pending on the file,
all outstanding writes will be discarded.
.TP
.BR F_SEAL_FUTURE_WRITE " (since Linux 5.1)"
-If this seal is set, the contents of the file can be modified only from
-existing writable mappings that were created prior to the seal being set.
+The effect of this seal is similar to
+.BR F_SEAL_WRITE ,
+but the contents of the file can still be modified via
+shared writable mappings that were created prior to the seal being set.
Any attempt to create a new writable mapping on the file via
.BR mmap (2)
will fail with
@@ -1537,10 +1539,10 @@ Likewise, an attempt to write to the file via
.BR write (2)
will fail with
.BR EPERM .
-This is useful in situations where existing writable mapped
-regions need to be kept intact while preventing any future writes.
-For example, to share a
-read-only memory buffer to other processes that only the sender can write to.
+.IP
+Using this seal,
+one process can create a memory buffer that it can continue to modify
+while sharing that buffer on a "read-only" basis with other processes.
.\"
.SS File read/write hints
Write lifetime hints can be used to inform the kernel about the relative