diff --git a/man2/msgop.2 b/man2/msgop.2 index 3f5bc362f..b4c8c045a 100644 --- a/man2/msgop.2 +++ b/man2/msgop.2 @@ -105,13 +105,29 @@ by If sufficient space is available in the queue, .BR msgsnd () succeeds immediately. -(The queue capacity is defined by the -.I msg_qbytes +The queue capacity is governed by the +.I msg_qbytes field in the associated data structure for the message queue. During queue creation this field is initialized to .B MSGMNB 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 behavior of .BR msgsnd ()