shmop.2: Rework discussion of SHM_RDONLY and SHM_REMAP into list format

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-04-28 09:11:22 +02:00
parent 33c9088587
commit 8378b1152c
1 changed files with 15 additions and 13 deletions

View File

@ -38,7 +38,7 @@
.\"
.\" FIXME . Add an example program to this page.
.\" FIXME Linux 2.6.9 added SHM_EXEC, which should be documented
.TH SHMOP 2 2013-02-12 "Linux" "Linux Programmer's Manual"
.TH SHMOP 2 2014-04-28 "Linux" "Linux Programmer's Manual"
.SH NAME
shmat, shmdt \- System V shared memory operations
.SH SYNOPSIS
@ -81,21 +81,23 @@ Otherwise,
.I shmaddr
must be a page-aligned address at which the attach occurs.
.PP
If
.B SHM_RDONLY
is specified in
.IR shmflg ,
the segment is attached for reading and the process must have
read permission for the segment.
Otherwise, the segment is attached for read and write
In addition to
.BR SHM_DNR ,
the following flags may be specified in the
.I shmflg
bit-mask argument:
.TP
.BR SHM_RDONLY
Attach the segment read-only access.
The process must have read permission for the segment.
If this flag is not specified,
the segment is attached for read and write access,
and the process must have read and write permission for the segment.
There is no notion of a write-only shared memory segment.
.PP
The (Linux-specific)
.TP
.B SHM_REMAP
flag may be specified in
.I shmflg
to indicate that the mapping of the segment should replace
This (Linux-specific) flag specifies
that the mapping of the segment should replace
any existing mapping in the range starting at
.I shmaddr
and continuing for the size of the segment.