svn commit: r330801 - stable/10/lib/libc/sys
Brooks Davis
brooks at FreeBSD.org
Mon Mar 12 16:04:11 UTC 2018
Author: brooks
Date: Mon Mar 12 16:04:10 2018
New Revision: 330801
URL: https://svnweb.freebsd.org/changeset/base/330801
Log:
MFC r330409:
Refer to SysV IPC permissions as numeric constants.
POSIX defines no macros for these permissions.
Also remove unneeded headers from synopsis.
PR: 225905
Reviewed by: wblock
Differential Revision: https://reviews.freebsd.org/D14461
Modified:
stable/10/lib/libc/sys/msgget.2
stable/10/lib/libc/sys/semget.2
stable/10/lib/libc/sys/shmget.2
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/lib/libc/sys/msgget.2
==============================================================================
--- stable/10/lib/libc/sys/msgget.2 Mon Mar 12 15:57:55 2018 (r330800)
+++ stable/10/lib/libc/sys/msgget.2 Mon Mar 12 16:04:10 2018 (r330801)
@@ -31,7 +31,7 @@
.\" $FreeBSD$
.\"
.\"/
-.Dd July 9, 2009
+.Dd March 4, 2018
.Dt MSGGET 2
.Os
.Sh NAME
@@ -40,8 +40,6 @@
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
-.In sys/types.h
-.In sys/ipc.h
.In sys/msg.h
.Ft int
.Fn msgget "key_t key" "int msgflg"
@@ -83,7 +81,22 @@ are set to the effective gid of the calling process.
.It
.Va msg_perm.mode
is set to the lower 9 bits of
-.Fa msgflg .
+.Fa msgflg
+which are set by ORing these constants:
+.Bl -tag -width 0000
+.It Dv 0400
+Read access for user.
+.It Dv 0200
+Write access for user.
+.It Dv 0040
+Read access for group.
+.It Dv 0020
+Write access for group.
+.It Dv 0004
+Read access for other.
+.It Dv 0002
+Write access for other.
+.El
.It
.Va msg_cbytes ,
.Va msg_qnum ,
Modified: stable/10/lib/libc/sys/semget.2
==============================================================================
--- stable/10/lib/libc/sys/semget.2 Mon Mar 12 15:57:55 2018 (r330800)
+++ stable/10/lib/libc/sys/semget.2 Mon Mar 12 16:04:10 2018 (r330801)
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 7, 2016
+.Dd March 4, 2018
.Dt SEMGET 2
.Os
.Sh NAME
@@ -34,8 +34,6 @@
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
-.In sys/types.h
-.In sys/ipc.h
.In sys/sem.h
.Ft int
.Fn semget "key_t key" "int nsems" "int flag"
@@ -77,23 +75,22 @@ may be used to generate a key from a pathname.
.\" Likewise for this section, except SHM_* becomes SEM_*.
.\"
.Pp
-The mode of a newly created IPC object is determined by
-.Em OR Ns 'ing
-the following constants into the
+The mode of a newly created IPC object is determined by ORing these constants
+into the
.Fa flag
argument:
-.Bl -tag -width XSEM_WXX6XXX
-.It Dv SEM_R
+.Bl -tag -width 0000
+.It Dv 0400
Read access for user.
-.It Dv SEM_A
+.It Dv 0200
Alter access for user.
-.It Dv ( SEM_R>>3 )
+.It Dv 0040
Read access for group.
-.It Dv ( SEM_A>>3 )
+.It Dv 0020
Alter access for group.
-.It Dv ( SEM_R>>6 )
+.It Dv 0004
Read access for other.
-.It Dv ( SEM_A>>6 )
+.It Dv 0002
Alter access for other.
.El
.Pp
Modified: stable/10/lib/libc/sys/shmget.2
==============================================================================
--- stable/10/lib/libc/sys/shmget.2 Mon Mar 12 15:57:55 2018 (r330800)
+++ stable/10/lib/libc/sys/shmget.2 Mon Mar 12 16:04:10 2018 (r330801)
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd December 17, 2010
+.Dd March 4, 2018
.Dt SHMGET 2
.Os
.Sh NAME
@@ -34,8 +34,6 @@
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
-.In sys/types.h
-.In sys/ipc.h
.In sys/shm.h
.Ft int
.Fn shmget "key_t key" "size_t size" "int flag"
@@ -74,22 +72,21 @@ may be used to generate a key from a pathname.
.El
.Pp
The mode of a newly created IPC object is determined by
-.Em OR Ns 'ing
-the following constants into the
+which are set by ORing these constants into the
.Fa flag
argument:
-.Bl -tag -width XSHM_WXX6XXX
-.It Dv S_IRUSR
+.Bl -tag -width 0000
+.It Dv 0400
Read access for owner.
-.It Dv S_IWUSR
+.It Dv 0200
Write access for owner.
-.It Dv S_IRGRP
+.It Dv 0040
Read access for group.
-.It Dv S_IWGRP
+.It Dv 0020
Write access for group.
-.It Dv S_IROTH
+.It Dv 0004
Read access for other.
-.It Dv S_IWOTH
+.It Dv 0002
Write access for other.
.El
.\"
@@ -142,5 +139,4 @@ already exists.
.Xr shmat 2 ,
.Xr shmctl 2 ,
.Xr shmdt 2 ,
-.Xr stat 2 ,
.Xr ftok 3
More information about the svn-src-stable-10
mailing list