]> git.saurik.com Git - apple/libc.git/blame - sys.subproj/shm_unlink.2
Libc-186.tar.gz
[apple/libc.git] / sys.subproj / shm_unlink.2
CommitLineData
e9ce8d39
A
1.\" $Darwin$
2.\"
3.\" Wilfredo Sanchez, wsanchez@apple.com
4.\" Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
5.\"
6.\" @APPLE_LICENSE_HEADER_START@
7.\"
8.\" The contents of this file constitute Original Code as defined in and
9.\" are subject to the Apple Public Source License Version 1.1 (the
10.\" "License"). You may not use this file except in compliance with the
11.\" License. Please obtain a copy of the License at
12.\" http://www.apple.com/publicsource and read it before using this file.
13.\"
14.\" This Original Code and all software distributed under the License are
15.\" distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16.\" EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17.\" INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18.\" FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19.\" License for the specific language governing rights and limitations
20.\" under the License.
21.\"
22.\" @APPLE_LICENSE_HEADER_END@
23.\"
24.Dd September 20, 1999
25.Dt SHM_UNLINK 2
26.Os Darwin
27.Sh NAME
28.Nm shm_unlink
29.Nd remove shared memory object
30.Sh SYNOPSIS
31.Fd #include <sys/mman.h>
32.Ft int
33.Fn shm_unlink "const char *name"
34.Sh DESCRIPTION
35The
36.Fn shm_unlink
37function removes the shared memory object named by
38.Fa name .
39If no process has the file open, then all resources associated
40with the object are reclaimed.
41If one or more process have the object open, the name removed,
42but the removal of the memory object is delayed until all
43references to it have been closed.
44.Sh RETURN VALUES
45Upon successful completion, a value of 0 is returned.
46Otherwise, a value of -1 is returned and
47.Va errno
48is set to indicate the error, and the named shared memory object
49will remain unchanged.
50.Sh ERRORS
51The
52.Fn shm_unlink
53succeeds unless:
54.Bl -tag -width Er
55.It Bq Er EACCES
56Permission is denied to be remove the object.
57.It Bq Er ENAMETOOLONG
58.Fa name
59exceeded
60.Dv SHM_NAME_MAX
61characters.
62.It Bq Er ENOENT
63The named object does not exist.
64.El
65.Sh SEE ALSO
66.Xr close 2 ,
67.Xr mmap 2 ,
68.Xr munmap 2 ,
69.Xr shmat 2 ,
70.Xr shmctl 2 ,
71.Xr shm_open 2
72.Sh HISTORY
73.Fn shm_open
74is specified in the POSIX Realtime Extension (1003.1b-1993/1003.1i-1995).