COHERENT manpages

This page displays the COHERENT manpage for shmdt() [Detach a shared-memory segment from a process].

List of available manpages
Index


shmdt() -- General Function (libc)

Detach a shared-memory segment from a process
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
char *shmdt (shmaddr)
char *shmaddr;

shmdt()  detaches the  shared-memory segment  at  address shmaddr  from the
calling  process.   If   all  went  well,  shmdt()  returns  returns  zero;
otherwise,  it returns  -1  and sets  errno  to an  appropriate value.   In
particular,  it sets  errno to  EINVAL  if shmaddr  does not  point to  the
beginning of a shared-memory segment.

Example

For an example of this function, see the Lexicon entry for shmget().

See Also

libc,
shmctl(),
shmdt(),
shmget()

Notes

The COHERENT implementation of shared memory does not yet support attaching
a shared-memory  segment to a user-defined  address.  Therefore, you should
always set shmaddr to zero.