]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man2/msgctl.2
intro.1, _exit.2, access.2, alarm.2, alloc_hugepages.2, arch_prctl.2, bind.2, chdir...
[thirdparty/man-pages.git] / man2 / msgctl.2
index 8e9c87ad9ec463b69bb62ae82b80cdf5793b4bee..3f7ad9c6857a40e6b3de4031d733e84c7b9cbe75 100644 (file)
@@ -1,6 +1,7 @@
 .\" Copyright 1993 Giorgio Ciucci (giorgio@crcc.it)
 .\" and Copyright 2004, 2005 Michael Kerrisk <mtk.manpages@gmail.com>
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
@@ -20,6 +21,7 @@
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
 .\" Modified Tue Oct 22 08:11:14 EDT 1996 by Eric S. Raymond <esr@thyrsus.com>
 .\" Modified Sun Feb 18 01:59:29 2001 by Andries E. Brouwer <aeb@cwi.nl>
@@ -32,7 +34,7 @@
 .\"    Added msqid_ds and ipc_perm structure definitions
 .\" 2005-08-02, mtk: Added IPC_INFO, MSG_INFO, MSG_STAT descriptions
 .\"
-.TH MSGCTL 2 2008-08-06 "Linux" "Linux Programmer's Manual"
+.TH MSGCTL 2 2012-05-31 "Linux" "Linux Programmer's Manual"
 .SH NAME
 msgctl \- message control operations
 .SH SYNOPSIS
@@ -62,7 +64,7 @@ struct msqid_ds {
     time_t          msg_rtime;    /* Time of last msgrcv(2) */
     time_t          msg_ctime;    /* Time of last change */
     unsigned long   __msg_cbytes; /* Current number of bytes in
-                                     queue (non-standard) */
+                                     queue (nonstandard) */
     msgqnum_t       msg_qnum;     /* Current number of messages
                                      in queue */
     msglen_t        msg_qbytes;   /* Maximum number of bytes
@@ -75,7 +77,7 @@ struct msqid_ds {
 .PP
 The
 .I ipc_perm
-structure is defined in \fI<sys/ipc.h>\fP as follows
+structure is defined as follows
 (the highlighted fields are settable using
 .BR IPC_SET ):
 .PP
@@ -221,7 +223,7 @@ However, the
 argument is not a queue identifier, but instead an index into
 the kernel's internal array that maintains information about
 all message queues on the system.
-.SH "RETURN VALUE"
+.SH RETURN VALUE
 On success,
 .BR IPC_STAT ,
 .BR IPC_SET ,
@@ -306,17 +308,30 @@ of the message queue,
 and the process is not privileged (Linux: it does not have the
 .B CAP_SYS_ADMIN
 capability).
-.SH "CONFORMING TO"
+.SH CONFORMING TO
 SVr4, POSIX.1-2001.
 .\" SVID does not document the EIDRM error condition.
 .SH NOTES
+The inclusion of
+.I <sys/types.h>
+and
+.I <sys/ipc.h>
+isn't required on Linux or by any version of POSIX.
+However,
+some old implementations required the inclusion of these header files,
+and the SVID also documented their inclusion.
+Applications intended to be portable to such old systems may need
+to include these header files.
+.\" Like Linux, the FreeBSD man pages still document
+.\" the inclusion of these header files.
+
 The
 .BR IPC_INFO ,
 .B MSG_STAT
 and
 .B MSG_INFO
 operations are used by the
-.BR ipcs (8)
+.BR ipcs (1)
 program to provide information on allocated resources.
 In the future these may modified or moved to a /proc file system
 interface.
@@ -334,7 +349,7 @@ a recompilation under glibc-2.1.91 or later should suffice.
 .B IPC_64
 flag in
 .IR cmd .)
-.SH "SEE ALSO"
+.SH SEE ALSO
 .BR msgget (2),
 .BR msgrcv (2),
 .BR msgsnd (2),