Hi Moritz,

Moritz Buhl wrote on Thu, Jul 18, 2019 at 01:38:49PM +0200:
> bluhm@ wrote:

>> Moritz, can you create a man page ERRORS diff?

> Is the attached diff ok?

Yes, committed with some additional tweaks.

Thank you,
  Ingo


CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]        2019/07/18 06:57:12

Modified files:
        lib/libc/sys   : msgsnd.2 

Log message:
State that mtype < 1 causes EINVAL as required by POSIX
and as implemented by OpenBSD since sysv_msg.c rev. 1.35.
Diff from Moritz Buhl <mbuhl at moritzbuhl dot de> requested by bluhm@.

While here, add STANDARDS, improve HISTORY,
and use the customary .Fa for struct fields rather than .Va.


Index: msgsnd.2
===================================================================
RCS file: /cvs/src/lib/libc/sys/msgsnd.2,v
retrieving revision 1.19
diff -u -r1.19 msgsnd.2
--- msgsnd.2    10 Dec 2014 19:19:00 -0000      1.19
+++ msgsnd.2    18 Jul 2019 12:57:04 -0000
@@ -53,10 +53,10 @@
 char mtext[1]; /* body of message */
 .Ed
 .Pp
-.Va mtype
+.Fa mtype
 is an integer greater than 0 that can be used for selecting messages (see
 .Xr msgrcv 2 ) ;
-.Va mtext
+.Fa mtext
 is an array of
 .Fa msgsz
 bytes, with a size between 0 and that of the system limit
@@ -65,7 +65,7 @@
 If the number of bytes already on the message queue plus
 .Fa msgsz
 is bigger than the maximum number of bytes on the message queue
-.Po Va msg_qbytes ,
+.Po Fa msg_qbytes ,
  see
 .Xr msgctl 2
 .Pc ,
@@ -105,16 +105,16 @@
 queue is updated in the following way:
 .Bl -bullet
 .It
-.Va msg_cbytes
+.Fa msg_cbytes
 is incremented by the size of the message.
 .It
-.Va msg_qnum
+.Fa msg_qnum
 is incremented by 1.
 .It
-.Va msg_lspid
+.Fa msg_lspid
 is set to the pid of the calling process.
 .It
-.Va msg_stime
+.Fa msg_stime
 is set to the current time.
 .El
 .Sh RETURN VALUES
@@ -127,9 +127,12 @@
 .Fa msqid
 is not a valid message queue identifier.
 .Pp
+.Fa mtype
+is less than 1.
+.Pp
 .Fa msgsz
 is greater than
-.Va msg_qbytes .
+.Fa msg_qbytes .
 .It Bq Er EACCES
 The calling process does not have write access to the message queue.
 .It Bq Er EAGAIN
@@ -153,6 +156,13 @@
 .Xr msgctl 2 ,
 .Xr msgget 2 ,
 .Xr msgrcv 2
+.Sh STANDARDS
+The
+.Fn msgsnd
+function conforms to the X/Open System Interfaces option of
+.St -p1003.1-2008 .
 .Sh HISTORY
-Message queues appeared in
-.At V.1 .
+Message queues first appeared in
+.At V.1
+and have been available since
+.Nx 1.0 .

Reply via email to