mirror of https://github.com/mkerrisk/man-pages
msgget.2, semget.2, shmget.2: The purpose of "flags" == 0 is to obtain ID of an existing IPC object
This was implied in these pages, but the meaning of "flags" == 0 could be more explicit, as indicated by questions such as https://stackoverflow.com/questions/49833569/flag-value-of-semget-function Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
d934a28ce9
commit
f8ac3de383
|
@ -50,6 +50,14 @@ system call returns the System\ V message queue identifier associated
|
||||||
with the value of the
|
with the value of the
|
||||||
.I key
|
.I key
|
||||||
argument.
|
argument.
|
||||||
|
It may be used either to obtain the identifier of a previously created
|
||||||
|
message queue (when
|
||||||
|
.I msgflg
|
||||||
|
is zero and
|
||||||
|
.I key
|
||||||
|
does not have the value
|
||||||
|
.BR IPC_PRIVATE ),
|
||||||
|
or to create a new set.
|
||||||
.PP
|
.PP
|
||||||
A new message queue is created if
|
A new message queue is created if
|
||||||
.I key
|
.I key
|
||||||
|
|
|
@ -52,6 +52,15 @@ The
|
||||||
system call returns the System\ V semaphore set identifier
|
system call returns the System\ V semaphore set identifier
|
||||||
associated with the argument
|
associated with the argument
|
||||||
.IR key .
|
.IR key .
|
||||||
|
It may be used either to obtain the identifier of a previously created
|
||||||
|
semaphore set (when
|
||||||
|
.I semflg
|
||||||
|
is zero and
|
||||||
|
.I key
|
||||||
|
does not have the value
|
||||||
|
.BR IPC_PRIVATE ),
|
||||||
|
or to create a new set.
|
||||||
|
.PP
|
||||||
A new set of
|
A new set of
|
||||||
.I nsems
|
.I nsems
|
||||||
semaphores is created if
|
semaphores is created if
|
||||||
|
|
|
@ -51,6 +51,14 @@ shmget \- allocates a System V shared memory segment
|
||||||
returns the identifier of the System\ V shared memory segment
|
returns the identifier of the System\ V shared memory segment
|
||||||
associated with the value of the argument
|
associated with the value of the argument
|
||||||
.IR key .
|
.IR key .
|
||||||
|
It may be used either to obtain the identifier of a previously created
|
||||||
|
shared memory segment (when
|
||||||
|
.I shmflg
|
||||||
|
is zero and
|
||||||
|
.I key
|
||||||
|
does not have the value
|
||||||
|
.BR IPC_PRIVATE ),
|
||||||
|
or to create a new set.
|
||||||
.PP
|
.PP
|
||||||
A new shared memory segment, with size equal to the value of
|
A new shared memory segment, with size equal to the value of
|
||||||
.I size
|
.I size
|
||||||
|
|
Loading…
Reference in New Issue