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