9103 opengroup acknowledgement should be properly formatted in man pages
[unleashed.git] / usr / src / man / man3c / shm_unlink.3c
blob5d72dafc88396c531251d6ba82791306f4c408be
1 .\"
2 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
3 .\" permission to reproduce portions of its copyrighted documentation.
4 .\" Original documentation from The Open Group can be obtained online at
5 .\" http://www.opengroup.org/bookstore/.
6 .\"
7 .\" The Institute of Electrical and Electronics Engineers and The Open
8 .\" Group, have given us permission to reprint portions of their
9 .\" documentation.
10 .\"
11 .\" In the following statement, the phrase ``this text'' refers to portions
12 .\" of the system documentation.
13 .\"
14 .\" Portions of this text are reprinted and reproduced in electronic form
15 .\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
16 .\" Standard for Information Technology -- Portable Operating System
17 .\" Interface (POSIX), The Open Group Base Specifications Issue 6,
18 .\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
19 .\" Engineers, Inc and The Open Group.  In the event of any discrepancy
20 .\" between these versions and the original IEEE and The Open Group
21 .\" Standard, the original IEEE and The Open Group Standard is the referee
22 .\" document.  The original Standard can be obtained online at
23 .\" http://www.opengroup.org/unix/online.html.
24 .\"
25 .\" This notice shall appear on any product containing this material.
26 .\"
27 .\" The contents of this file are subject to the terms of the
28 .\" Common Development and Distribution License (the "License").
29 .\" You may not use this file except in compliance with the License.
30 .\"
31 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32 .\" or http://www.opensolaris.org/os/licensing.
33 .\" See the License for the specific language governing permissions
34 .\" and limitations under the License.
35 .\"
36 .\" When distributing Covered Code, include this CDDL HEADER in each
37 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38 .\" If applicable, add the following below this CDDL HEADER, with the
39 .\" fields enclosed by brackets "[]" replaced with your own identifying
40 .\" information: Portions Copyright [yyyy] [name of copyright owner]
41 .\"
42 .\"
43 .\" Copyright 1989 AT&T
44 .\" Portions Copyright (c) 1992, X/Open Company Limited.  All Rights Reserved.
45 .\" Copyright (c) 2008, Sun Microsystems, Inc.  All Rights Reserved.
46 .\"
47 .TH SHM_UNLINK 3C "Feb 5, 2008"
48 .SH NAME
49 shm_unlink \- remove a shared memory object
50 .SH SYNOPSIS
51 .LP
52 .nf
53 #include <sys/mman.h>
55 \fBint\fR \fBshm_unlink\fR(\fBconst char *\fR\fIname\fR);
56 .fi
58 .SH DESCRIPTION
59 .sp
60 .LP
61 The \fBshm_unlink()\fR function removes the name of the shared memory object
62 named by the string pointed to by \fIname\fR. If one or more references to the
63 shared memory object exists when the object is unlinked, the name is removed
64 before \fBshm_unlink()\fR returns, but the removal of the memory object
65 contents will be postponed until all open and mapped references to the shared
66 memory object have been removed.
67 .SH RETURN VALUES
68 .sp
69 .LP
70 Upon successful completion, \fBshm_unlink()\fR returns \fB0\fR. Otherwise it
71 returns \fB\(mi1\fR and sets \fBerrno\fR to indicate the error condition, and
72 the named shared memory object is not affected by this function call.
73 .SH ERRORS
74 .sp
75 .LP
76 The  \fBshm_unlink()\fR function will fail if:
77 .sp
78 .ne 2
79 .na
80 \fB\fBEACCES\fR \fR
81 .ad
82 .RS 17n
83 Permission is denied to unlink the named shared memory object.
84 .RE
86 .sp
87 .ne 2
88 .na
89 \fB\fBENAMETOOLONG\fR \fR
90 .ad
91 .RS 17n
92 The length of the \fIname\fR string exceeds  \fBPATH_MAX\fR, or a pathname
93 component is longer than  \fINAME_MAX\fR while  \fB_POSIX_NO_TRUNC\fR is in
94 effect.
95 .RE
97 .sp
98 .ne 2
99 .na
100 \fB\fBENOENT\fR \fR
102 .RS 17n
103 The named shared memory object does not exist.
107 .ne 2
109 \fB\fBENOSYS\fR \fR
111 .RS 17n
112 The \fBshm_unlink()\fR function is not supported by the system.
115 .SH ATTRIBUTES
118 See \fBattributes\fR(5) for descriptions of the following attributes:
123 box;
124 c | c
125 l | l .
126 ATTRIBUTE TYPE  ATTRIBUTE VALUE
128 Interface Stability     Committed
130 MT-Level        MT-Safe
132 Standard        See \fBstandards\fR(5).
135 .SH SEE ALSO
138 \fBclose\fR(2), \fBmmap\fR(2), \fBmlock\fR(3C), \fBshm_open\fR(3C),
139 \fBattributes\fR(5), \fBstandards\fR(5)
140 .SH NOTES
143 Solaris 2.6 was the first release to support the Asynchronous Input and Output
144 option. Prior to this release, this function always returned \fB\(mi1\fR and
145 set \fBerrno\fR to \fBENOSYS\fR.