mirror of https://github.com/mkerrisk/man-pages
msgop.2: Enhance description of "full queue" criteria
Signed-off-by: Davidlohr Bueso <davidlohr@hp.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
be6752b65a
commit
64190fa613
22
man2/msgop.2
22
man2/msgop.2
|
@ -105,13 +105,29 @@ by
|
||||||
If sufficient space is available in the queue,
|
If sufficient space is available in the queue,
|
||||||
.BR msgsnd ()
|
.BR msgsnd ()
|
||||||
succeeds immediately.
|
succeeds immediately.
|
||||||
(The queue capacity is defined by the
|
The queue capacity is governed by the
|
||||||
.I msg_qbytes
|
.I msg_qbytes
|
||||||
field in the associated data structure for the message queue.
|
field in the associated data structure for the message queue.
|
||||||
During queue creation this field is initialized to
|
During queue creation this field is initialized to
|
||||||
.B MSGMNB
|
.B MSGMNB
|
||||||
bytes, but this limit can be modified using
|
bytes, but this limit can be modified using
|
||||||
.BR msgctl (2).)
|
.BR msgctl (2).
|
||||||
|
A full queue is defined by two factors :
|
||||||
|
.IP * 2
|
||||||
|
The new msg size + current size of the queue is greater than the
|
||||||
|
queue's maximum size (the
|
||||||
|
.I msg_qbytes
|
||||||
|
field).
|
||||||
|
.IP *
|
||||||
|
The current amount of messages in the queue + 1 (the new msg) is
|
||||||
|
greater than the queue's maximum size (the
|
||||||
|
.I msg_qbytes
|
||||||
|
field). This is necessary to prevent users from using infinite
|
||||||
|
amounts of locked memory (used by the kernel for headers) by
|
||||||
|
sending 0-byte messages. This is equivalent to the traditional
|
||||||
|
MSGTQL parameter present in many Unix systems. This behavior
|
||||||
|
is unique to Linux.
|
||||||
|
.PP
|
||||||
If insufficient space is available in the queue, then the default
|
If insufficient space is available in the queue, then the default
|
||||||
behavior of
|
behavior of
|
||||||
.BR msgsnd ()
|
.BR msgsnd ()
|
||||||
|
|
Loading…
Reference in New Issue