SHMDT(2,L) AIX Technical Reference SHMDT(2,L)
-------------------------------------------------------------------------------
shmdt
PURPOSE
Detaches a shared memory segment.
SYNTAX
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
int shmdt (shmaddr)
char *shmaddr;
DESCRIPTION
The shmdt system call detaches, from the calling process's data segment, the
shared memory segment located at the address specified by the shmaddr
parameter.
RETURN VALUE
Upon successful completion, a value of 0 is returned. If shmdt fails, a value
of -1 is returned and errno is set to indicate the error.
ERROR CONDITIONS
The shmdt system call fails and the shared memory segment is not detached if
the following is true:
EINVAL The shmaddr parameter is not the data segment start address of a
shared memory segment.
ETXTBSY The shmdt system call attempted to detach a segment attached to a
shared library.
RELATED INFORMATION
In this book: "exec: execl, execv, execle, execve, execlp, execvp," "exit,
_exit," "fork, vfork," "shmat," "shmctl," and "shmget."
Processed November 7, 1990 SHMDT(2,L) 1