summaryrefslogtreecommitdiff
path: root/lib/libc/sys/shmctl.2
diff options
context:
space:
mode:
authorRobert Nagy <robert@cvs.openbsd.org>2011-10-27 07:56:29 +0000
committerRobert Nagy <robert@cvs.openbsd.org>2011-10-27 07:56:29 +0000
commit1691111ad60eba52ce586a07d639efeac20f3023 (patch)
treed2cdddd099776016378695c8cd7d4b91a2a9ece2 /lib/libc/sys/shmctl.2
parent466edb6579b47a5bcb8b66fed24fbd70781bdfbd (diff)
Allow segments to be used even after they were marked for deletion with
the IPC_RMID flag. This is permitted as an extension beyond the standards and this is similar to what other operating systems like linux do. Because compat_linux(8) was emulating this already, remove that code since now this is the default. input from oga@, guenther@, jmc@, deraadt@ ok deraadt@
Diffstat (limited to 'lib/libc/sys/shmctl.2')
-rw-r--r--lib/libc/sys/shmctl.215
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/libc/sys/shmctl.2 b/lib/libc/sys/shmctl.2
index c401414c338..f53d95428a0 100644
--- a/lib/libc/sys/shmctl.2
+++ b/lib/libc/sys/shmctl.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: shmctl.2,v 1.13 2007/05/31 19:19:33 jmc Exp $
+.\" $OpenBSD: shmctl.2,v 1.14 2011/10/27 07:56:28 robert Exp $
.\" $NetBSD: shmctl.2,v 1.3 1997/03/27 08:20:39 mikel Exp $
.\"
.\" Copyright (c) 1995 Frank van der Linden
@@ -30,7 +30,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"/
-.Dd $Mdocdate: May 31 2007 $
+.Dd $Mdocdate: October 27 2011 $
.Dt SHMCTL 2
.Os
.Sh NAME
@@ -123,9 +123,10 @@ or
in the data structure associated with the shared memory segment.
.Pp
.It Dv IPC_RMID
-Remove the shared memory segment specified by
+Mark the shared memory segment specified by
.Fa shmid
-and destroy the data associated with it.
+for removal when it is no longer in use by any process.
+When it is removed, all data associated with it will be destroyed too.
Only the superuser or a process with an effective UID equal to the
.Va shm_perm.cuid
or
@@ -192,3 +193,9 @@ specifies an invalid address.
.Sh SEE ALSO
.Xr shmat 2 ,
.Xr shmget 2
+.Sh STANDARDS
+Segments which are marked for removal (but not yet removed
+since they are still in use) can be attached to by new callers
+using
+.Xr shmat 2 .
+This is permitted as an extension beyond the standards.