1SHMDT(P) POSIX Programmer's Manual SHMDT(P)
2
3
4
6 shmdt - XSI shared memory detach operation
7
9 #include <sys/shm.h>
10
11 int shmdt(const void *shmaddr);
12
13
15 The shmdt() function operates on XSI shared memory (see the Base Defi‐
16 nitions volume of IEEE Std 1003.1-2001, Section 3.340, Shared Memory
17 Object). It is unspecified whether this function interoperates with the
18 realtime interprocess communication facilities defined in Realtime .
19
20 The shmdt() function detaches the shared memory segment located at the
21 address specified by shmaddr from the address space of the calling
22 process.
23
25 Upon successful completion, shmdt() shall decrement the value of
26 shm_nattch in the data structure associated with the shared memory ID
27 of the attached shared memory segment and return 0.
28
29 Otherwise, the shared memory segment shall not be detached, shmdt()
30 shall return -1, and errno shall be set to indicate the error.
31
33 The shmdt() function shall fail if:
34
35 EINVAL The value of shmaddr is not the data segment start address of a
36 shared memory segment.
37
38
39 The following sections are informative.
40
42 None.
43
45 The POSIX Realtime Extension defines alternative interfaces for inter‐
46 process communication. Application developers who need to use IPC
47 should design their applications so that modules using the IPC routines
48 described in XSI Interprocess Communication can be easily modified to
49 use the alternative interfaces.
50
52 None.
53
55 None.
56
58 XSI Interprocess Communication , Realtime , exec() , exit() , fork() ,
59 shmat() , shmctl() , shmget() , shm_open() , shm_unlink() , the Base
60 Definitions volume of IEEE Std 1003.1-2001, <sys/shm.h>
61
63 Portions of this text are reprinted and reproduced in electronic form
64 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
65 -- Portable Operating System Interface (POSIX), The Open Group Base
66 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
67 Electrical and Electronics Engineers, Inc and The Open Group. In the
68 event of any discrepancy between this version and the original IEEE and
69 The Open Group Standard, the original IEEE and The Open Group Standard
70 is the referee document. The original Standard can be obtained online
71 at http://www.opengroup.org/unix/online.html .
72
73
74
75IEEE/The Open Group 2003 SHMDT(P)