From 6c52dc1aa1cfb3a781240a21308668e0df2add35 Mon Sep 17 00:00:00 2001
From: Sascha Wildner <saw@online.de>
Date: Sat, 28 Sep 2013 23:03:35 +0200
Subject: [PATCH 2/4] libc: Add info about the XSI IPC userspace implementation
 in the manpages.

---
 lib/libc/sys/msgctl.2 | 21 ++++++++++++++++++++-
 lib/libc/sys/msgget.2 | 21 ++++++++++++++++++++-
 lib/libc/sys/msgrcv.2 | 21 ++++++++++++++++++++-
 lib/libc/sys/msgsnd.2 | 21 ++++++++++++++++++++-
 lib/libc/sys/semctl.2 | 22 ++++++++++++++++++++--
 lib/libc/sys/semget.2 | 14 ++++++++++++--
 lib/libc/sys/semop.2  | 22 ++++++++++++++++++++--
 lib/libc/sys/shmat.2  | 21 ++++++++++++++++++++-
 lib/libc/sys/shmctl.2 | 21 ++++++++++++++++++++-
 lib/libc/sys/shmget.2 | 21 ++++++++++++++++++++-
 10 files changed, 192 insertions(+), 13 deletions(-)

diff --git a/lib/libc/sys/msgctl.2 b/lib/libc/sys/msgctl.2
index 94b79f9..42262db 100644
--- a/lib/libc/sys/msgctl.2
+++ b/lib/libc/sys/msgctl.2
@@ -31,7 +31,7 @@
 .\"
 .\" $FreeBSD: src/lib/libc/gen/msgctl.3,v 1.8.2.7 2003/03/13 18:05:37 trhodes Exp $
 .\"
-.Dd November 24, 1997
+.Dd September 28, 2013
 .Dt MSGCTL 2
 .Os
 .Sh NAME
@@ -167,6 +167,17 @@ or
 .Va msg_perm.gid .
 .Sh RETURN VALUES
 .Rv -std msgctl
+.Sh ENVIRONMENT
+The XSI Interprocess Communication family of functions is also available
+as an implementation in userspace.
+To use it, the
+.Xr sysvipcd 8
+daemon has to be running.
+.Pp
+If the
+.Ev USR_SYSVIPC
+variable is set in a process' environment, the process and its children
+will use the userspace implementation.
 .Sh ERRORS
 The
 .Fn msgctl
@@ -211,3 +222,11 @@ specifies an invalid address.
 .Sh HISTORY
 Message queues appeared in the first release of
 .At V .
+.Sh AUTHORS
+.An -nosplit
+The
+.Dx
+specific userspace implementation (see
+.Sx ENVIRONMENT )
+was written by
+.An Larisa Grigore .
diff --git a/lib/libc/sys/msgget.2 b/lib/libc/sys/msgget.2
index 78a24c0..d5f5058 100644
--- a/lib/libc/sys/msgget.2
+++ b/lib/libc/sys/msgget.2
@@ -31,7 +31,7 @@
 .\"
 .\" $FreeBSD: src/lib/libc/gen/msgget.3,v 1.7.2.5 2003/03/15 15:11:05 trhodes Exp $
 .\"
-.Dd August 17, 1995
+.Dd September 28, 2013
 .Dt MSGGET 2
 .Os
 .Sh NAME
@@ -106,6 +106,17 @@ Upon successful completion a positive message queue identifier is returned.
 Otherwise, -1 is returned and the global variable
 .Va errno
 is set to indicate the error.
+.Sh ENVIRONMENT
+The XSI Interprocess Communication family of functions is also available
+as an implementation in userspace.
+To use it, the
+.Xr sysvipcd 8
+daemon has to be running.
+.Pp
+If the
+.Ev USR_SYSVIPC
+variable is set in a process' environment, the process and its children
+will use the userspace implementation.
 .Sh ERRORS
 .Bl -tag -width Er
 .It Bq Er EACCES
@@ -139,3 +150,11 @@ was found.
 .Sh HISTORY
 Message queues appeared in the first release of
 .At V .
+.Sh AUTHORS
+.An -nosplit
+The
+.Dx
+specific userspace implementation (see
+.Sx ENVIRONMENT )
+was written by
+.An Larisa Grigore .
diff --git a/lib/libc/sys/msgrcv.2 b/lib/libc/sys/msgrcv.2
index b5095de..7f34386 100644
--- a/lib/libc/sys/msgrcv.2
+++ b/lib/libc/sys/msgrcv.2
@@ -31,7 +31,7 @@
 .\"
 .\" $FreeBSD: src/lib/libc/gen/msgrcv.3,v 1.8.2.7 2003/03/15 15:11:05 trhodes Exp $
 .\"
-.Dd November 24, 1997
+.Dd September 28, 2013
 .Dt MSGRCV 2
 .Os
 .Sh NAME
@@ -166,6 +166,17 @@ field of the structure pointed to by
 Otherwise, -1 is returned, and
 .Va errno
 set to indicate the error.
+.Sh ENVIRONMENT
+The XSI Interprocess Communication family of functions is also available
+as an implementation in userspace.
+To use it, the
+.Xr sysvipcd 8
+daemon has to be running.
+.Pp
+If the
+.Ev USR_SYSVIPC
+variable is set in a process' environment, the process and its children
+will use the userspace implementation.
 .Sh ERRORS
 The
 .Fn msgrcv
@@ -215,6 +226,14 @@ is set in
 .Sh HISTORY
 Message queues appeared in the first release of
 .At V .
+.Sh AUTHORS
+.An -nosplit
+The
+.Dx
+specific userspace implementation (see
+.Sx ENVIRONMENT )
+was written by
+.An Larisa Grigore .
 .Sh BUGS
 .Nx ,
 .Dx ,
diff --git a/lib/libc/sys/msgsnd.2 b/lib/libc/sys/msgsnd.2
index 2b88534..bfad3d1 100644
--- a/lib/libc/sys/msgsnd.2
+++ b/lib/libc/sys/msgsnd.2
@@ -31,7 +31,7 @@
 .\"
 .\" $FreeBSD: src/lib/libc/gen/msgsnd.3,v 1.9.2.5 2001/12/14 18:33:51 ru Exp $
 .\"
-.Dd November 24, 1997
+.Dd September 28, 2013
 .Dt MSGSND 2
 .Os
 .Sh NAME
@@ -122,6 +122,17 @@ is set to the current time.
 .El
 .Sh RETURN VALUES
 .Rv -std msgsnd
+.Sh ENVIRONMENT
+The XSI Interprocess Communication family of functions is also available
+as an implementation in userspace.
+To use it, the
+.Xr sysvipcd 8
+daemon has to be running.
+.Pp
+If the
+.Ev USR_SYSVIPC
+variable is set in a process' environment, the process and its children
+will use the userspace implementation.
 .Sh ERRORS
 .Fn msgsnd
 will fail if:
@@ -157,6 +168,14 @@ The system call was interrupted by the delivery of a signal.
 .El
 .Sh HISTORY
 Message queues appeared in the first release of AT&T Unix System V.
+.Sh AUTHORS
+.An -nosplit
+The
+.Dx
+specific userspace implementation (see
+.Sx ENVIRONMENT )
+was written by
+.An Larisa Grigore .
 .Sh BUGS
 .Nx Ns ,
 .Dx Ns ,
diff --git a/lib/libc/sys/semctl.2 b/lib/libc/sys/semctl.2
index 9666244..b61124a 100644
--- a/lib/libc/sys/semctl.2
+++ b/lib/libc/sys/semctl.2
@@ -24,9 +24,8 @@
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
 .\" $FreeBSD: src/lib/libc/sys/semctl.2,v 1.9.2.6 2002/03/11 08:37:47 maxim Exp $
-.\" $DragonFly: src/lib/libc/sys/semctl.2,v 1.2 2003/06/17 04:26:47 dillon Exp $
 .\"
-.Dd September 12, 1995
+.Dd September 28, 2013
 .Dt SEMCTL 2
 .Os
 .Sh NAME
@@ -162,6 +161,17 @@ returns the corresponding value; otherwise, 0 is returned.
 On failure, -1 is returned, and
 .Va errno
 is set to indicate the error.
+.Sh ENVIRONMENT
+The XSI Interprocess Communication family of functions is also available
+as an implementation in userspace.
+To use it, the
+.Xr sysvipcd 8
+daemon has to be running.
+.Pp
+If the
+.Ev USR_SYSVIPC
+variable is set in a process' environment, the process and its children
+will use the userspace implementation.
 .Sh ERRORS
 .Fn Semctl
 will fail if:
@@ -182,3 +192,11 @@ semaphore set.
 .Sh SEE ALSO
 .Xr semget 2 ,
 .Xr semop 2
+.Sh AUTHORS
+.An -nosplit
+The
+.Dx
+specific userspace implementation (see
+.Sx ENVIRONMENT )
+was written by
+.An Larisa Grigore .
diff --git a/lib/libc/sys/semget.2 b/lib/libc/sys/semget.2
index 276f7f1..0de5e7b 100644
--- a/lib/libc/sys/semget.2
+++ b/lib/libc/sys/semget.2
@@ -24,9 +24,8 @@
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
 .\" $FreeBSD: src/lib/libc/sys/semget.2,v 1.7.2.5 2001/12/14 18:34:01 ru Exp $
-.\" $DragonFly: src/lib/libc/sys/semget.2,v 1.2 2003/06/17 04:26:47 dillon Exp $
 .\"
-.Dd September 12, 1995
+.Dd September 28, 2013
 .Dt SEMGET 2
 .Os
 .Sh NAME
@@ -107,6 +106,17 @@ returns the id of a semaphore set if successful; otherwise, -1
 is returned and
 .Va errno
 is set to indicate the error.
+.Sh ENVIRONMENT
+The XSI Interprocess Communication family of functions is also available
+as an implementation in userspace.
+To use it, the
+.Xr sysvipcd 8
+daemon has to be running.
+.Pp
+If the
+.Ev USR_SYSVIPC
+variable is set in a process' environment, the process and its children
+will use the userspace implementation.
 .Sh ERRORS
 .Fn Semget
 will fail if:
diff --git a/lib/libc/sys/semop.2 b/lib/libc/sys/semop.2
index cad8d8e..f33a513 100644
--- a/lib/libc/sys/semop.2
+++ b/lib/libc/sys/semop.2
@@ -24,9 +24,8 @@
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
 .\" $FreeBSD: src/lib/libc/sys/semop.2,v 1.7.2.6 2001/12/14 18:34:01 ru Exp $
-.\" $DragonFly: src/lib/libc/sys/semop.2,v 1.2 2003/06/17 04:26:47 dillon Exp $
 .\"
-.Dd September 22, 1995
+.Dd September 28, 2013
 .Dt SEMOP 2
 .Os
 .Sh NAME
@@ -165,6 +164,17 @@ be used to insure that a resource is released if a process terminates
 unexpectedly.
 .Sh RETURN VALUES
 .Rv -std semop
+.Sh ENVIRONMENT
+The XSI Interprocess Communication family of functions is also available
+as an implementation in userspace.
+To use it, the
+.Xr sysvipcd 8
+daemon has to be running.
+.Pp
+If the
+.Ev USR_SYSVIPC
+variable is set in a process' environment, the process and its children
+will use the userspace implementation.
 .Sh ERRORS
 .Fn Semop
 will fail if:
@@ -192,3 +202,11 @@ was not in the range of valid semaphores for the set.
 .Sh SEE ALSO
 .Xr semctl 2 ,
 .Xr semget 2
+.Sh AUTHORS
+.An -nosplit
+The
+.Dx
+specific userspace implementation (see
+.Sx ENVIRONMENT )
+was written by
+.An Larisa Grigore .
diff --git a/lib/libc/sys/shmat.2 b/lib/libc/sys/shmat.2
index b6b9dd5..bb4e784 100644
--- a/lib/libc/sys/shmat.2
+++ b/lib/libc/sys/shmat.2
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD: src/lib/libc/sys/shmat.2,v 1.8.2.6 2001/12/14 18:34:01 ru Exp $
 .\"
-.Dd October 29, 2011
+.Dd September 28, 2013
 .Dt SHMAT 2
 .Os
 .Sh NAME
@@ -86,6 +86,17 @@ is returned and
 is set to indicate the error.
 .Pp
 .Rv -std shmdt
+.Sh ENVIRONMENT
+The XSI Interprocess Communication family of functions is also available
+as an implementation in userspace.
+To use it, the
+.Xr sysvipcd 8
+daemon has to be running.
+.Pp
+If the
+.Ev USR_SYSVIPC
+variable is set in a process' environment, the process and its children
+will use the userspace implementation.
 .Sh ERRORS
 .Fn Shmat
 will fail if:
@@ -108,3 +119,11 @@ does not point to a shared memory segment.
 .Sh "SEE ALSO"
 .Xr shmctl 2 ,
 .Xr shmget 2
+.Sh AUTHORS
+.An -nosplit
+The
+.Dx
+specific userspace implementation (see
+.Sx ENVIRONMENT )
+was written by
+.An Larisa Grigore .
diff --git a/lib/libc/sys/shmctl.2 b/lib/libc/sys/shmctl.2
index b251acc..227b84b 100644
--- a/lib/libc/sys/shmctl.2
+++ b/lib/libc/sys/shmctl.2
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD: src/lib/libc/sys/shmctl.2,v 1.9.2.4 2001/12/14 18:34:01 ru Exp $
 .\"
-.Dd October 29, 2011
+.Dd September 28, 2013
 .Dt SHMCTL 2
 .Os
 .Sh NAME
@@ -112,6 +112,17 @@ struct shmid_ds {
 .Ed
 .Sh RETURN VALUES
 .Rv -std shmctl
+.Sh ENVIRONMENT
+The XSI Interprocess Communication family of functions is also available
+as an implementation in userspace.
+To use it, the
+.Xr sysvipcd 8
+daemon has to be running.
+.Pp
+If the
+.Ev USR_SYSVIPC
+variable is set in a process' environment, the process and its children
+will use the userspace implementation.
 .Sh ERRORS
 .Fn Shmctl
 will fail if:
@@ -136,3 +147,11 @@ shared memory segment.
 .Xr shmdt 2 ,
 .Xr shmget 2 ,
 .Xr ftok 3
+.Sh AUTHORS
+.An -nosplit
+The
+.Dx
+specific userspace implementation (see
+.Sx ENVIRONMENT )
+was written by
+.An Larisa Grigore .
diff --git a/lib/libc/sys/shmget.2 b/lib/libc/sys/shmget.2
index ee89b26..5883119 100644
--- a/lib/libc/sys/shmget.2
+++ b/lib/libc/sys/shmget.2
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD: src/lib/libc/sys/shmget.2,v 1.8.2.6 2001/12/14 18:34:01 ru Exp $
 .\"
-.Dd October 29, 2011
+.Dd September 28, 2013
 .Dt SHMGET 2
 .Os
 .Sh NAME
@@ -110,6 +110,17 @@ returns the positive integer identifier of a shared memory segment.
 Otherwise, -1 is returned and
 .Va errno
 set to indicate the error.
+.Sh ENVIRONMENT
+The XSI Interprocess Communication family of functions is also available
+as an implementation in userspace.
+To use it, the
+.Xr sysvipcd 8
+daemon has to be running.
+.Pp
+If the
+.Ev USR_SYSVIPC
+variable is set in a process' environment, the process and its children
+will use the userspace implementation.
 .Sh ERRORS
 .Fn Shmget
 will fail if:
@@ -139,3 +150,11 @@ already exists.
 .Xr shmctl 2 ,
 .Xr shmdt 2 ,
 .Xr ftok 3
+.Sh AUTHORS
+.An -nosplit
+The
+.Dx
+specific userspace implementation (see
+.Sx ENVIRONMENT )
+was written by
+.An Larisa Grigore .
-- 
1.8.3.4

