OSDN Git Service

(split) LDP: Update original to LDP v3.50.
[linuxjm/LDP_man-pages.git] / original / man2 / semctl.2
index 457a395..86e92aa 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 17:53:56 1996 by Eric S. Raymond <esr@thyrsus.com>
 .\" Modified Fri Jun 19 10:59:15 1998 by Andries Brouwer <aeb@cwi.nl>
@@ -36,7 +38,7 @@
 .\"    Added semid_ds and ipc_perm structure definitions
 .\" 2005-08-02, mtk: Added IPC_INFO, SEM_INFO, SEM_STAT descriptions.
 .\"
-.TH SEMCTL 2 2009-09-27 "Linux" "Linux Programmer's Manual"
+.TH SEMCTL 2 2012-05-31 "Linux" "Linux Programmer's Manual"
 .SH NAME
 semctl \- semaphore control operations
 .SH SYNOPSIS
@@ -93,7 +95,7 @@ struct semid_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
@@ -335,7 +337,7 @@ If the changes to semaphore values would permit blocked
 .BR semop (2)
 calls in other processes to proceed, then those processes are woken up.
 The calling process must have alter permission on the semaphore set.
-.SH "RETURN VALUE"
+.SH RETURN VALUE
 On failure
 .BR semctl ()
 returns \-1
@@ -457,10 +459,23 @@ and the value to which
 is to be set (for some semaphore of the set) is less than 0
 or greater than the implementation limit
 .BR SEMVMX .
-.SH "CONFORMING TO"
+.SH CONFORMING TO
 SVr4, POSIX.1-2001.
 .\" SVr4 documents more error conditions EINVAL and EOVERFLOW.
 .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 SEM_STAT
@@ -506,7 +521,7 @@ implementation dependent (32767).
 For greater portability it is best to always call
 .BR semctl ()
 with four arguments.
-.SH "SEE ALSO"
+.SH SEE ALSO
 .BR ipc (2),
 .BR semget (2),
 .BR semop (2),