Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Apr 2026 22:48:58 +0000
From:      Mitchell Horne <mhorne@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Cc:        Kit Dallege <xaum.io@gmail.com>
Subject:   git: 3e9f4fd6fc50 - main - mq_open(2): document sysctl limit EINVAL and ENFILE conditions
Message-ID:  <69cef25a.43d63.7fc8cda8@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by mhorne:

URL: https://cgit.FreeBSD.org/src/commit/?id=3e9f4fd6fc50300d052d5619d82a14d3488483d5

commit 3e9f4fd6fc50300d052d5619d82a14d3488483d5
Author:     Kit Dallege <xaum.io@gmail.com>
AuthorDate: 2026-04-02 17:37:49 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2026-04-02 22:48:52 +0000

    mq_open(2): document sysctl limit EINVAL and ENFILE conditions
    
    Document two missing error conditions for mq_open(2):
    
    - EINVAL: returned when mq_maxmsg exceeds kern.mqueue.maxmsg or
      mq_msgsize exceeds kern.mqueue.maxmsgsize.
    - ENFILE: add kern.mqueue.maxmq sysctl name to the existing entry.
    
    PR:             243209
    Reviewed by:    mhorne
    MFC after:      1 week
    Signed-off-by:  Kit Dallege <xaum.io@gmail.com>
    Pull Request:   https://github.com/freebsd/freebsd-src/pull/2098
---
 lib/libsys/mq_open.2 | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/lib/libsys/mq_open.2 b/lib/libsys/mq_open.2
index 4800ab18de59..f0b8618f62a5 100644
--- a/lib/libsys/mq_open.2
+++ b/lib/libsys/mq_open.2
@@ -35,7 +35,7 @@
 .\" the referee document.  The original Standard can be obtained online at
 .\"	http://www.opengroup.org/unix/online.html.
 .\"
-.Dd May 15, 2024
+.Dd April 2, 2026
 .Dt MQ_OPEN 2
 .Os
 .Sh NAME
@@ -282,6 +282,24 @@ and either
 or
 .Va mq_msgsize
 was less than or equal to zero.
+.It Bq Er EINVAL
+.Dv O_CREAT
+was specified in
+.Fa oflag ,
+the value of
+.Fa attr
+is not
+.Dv NULL ,
+and either
+.Va mq_maxmsg
+exceeds the
+.Va kern.mqueue.maxmsg
+sysctl limit,
+or
+.Va mq_msgsize
+exceeds the
+.Va kern.mqueue.maxmsgsize
+sysctl limit.
 .It Bq Er EMFILE
 Too many message queue descriptors or file descriptors are currently in use
 by this process.
@@ -295,6 +313,9 @@ is longer than
 .Brq Dv NAME_MAX .
 .It Bq Er ENFILE
 Too many message queues are currently open in the system.
+The system limit is controlled by the
+.Va kern.mqueue.maxmq
+sysctl.
 .It Bq Er ENOENT
 .Dv O_CREAT
 is not set and the named message queue does not exist.


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69cef25a.43d63.7fc8cda8>