mirror of https://github.com/mkerrisk/man-pages
fcntl.2: Further tweaks to F_SEAL_FUTURE_WRITE text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
e15b10ba32
commit
f3aa51b217
14
man2/fcntl.2
14
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
|
||||
|
|
Loading…
Reference in New Issue