Index of Section 2 Manual Pages
| Interix / SUA | shmdt.2 | Interix / SUA |
shmdt(2) shmdt(2)
shmdt()
NAME
shmdt() - detach shared memory segment
SYNOPSIS
#include
int shmdt(const void *shmaddr)
DESCRIPTION
The shmdt(2) function detaches the shared memory segment at shmaddr from
the address space of the calling process.
The function parameters are:
shmaddr
a pointer to a shared memory segment.
To delete a shared memory segment, use shmctl(2).
The header file includes .
RETURN VALUE
On success, the shmdt(2) function returns 0 and decrements the value of
shm_nattach in the data structure associated with the shared memory
segment.
On failure, the function return s-1 and sets errno
ERRORS
The shmdt(2) function can fail for the following reasons:
[EINVAL]
Shmaddr does not point to the start of a data segment for a shared
memory segment.
[ENOSYS]
The function isn't implemented.
SEE ALSO
shmat(2)
shmctl(2)
shmget(2)
USAGE NOTES
The shmdt function is thread safe.
The shmdt function is not async-signal safe.