.\" 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.
.\"
.\" 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>
.\" 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
.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
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 ,
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
.B IPC_64
flag in
.IR cmd .)
-.SH "SEE ALSO"
+.SH SEE ALSO
.BR msgget (2),
.BR msgrcv (2),
.BR msgsnd (2),