[Previous]
[Contents]
[Next]

shm_unlink()

remove a shared memory object

Synopsis:

#include <sys/mman.h>
int shm_unlink( const char *name );

Description:

The shm_unlink() function removes the name of the shared memory object specified by name. If one or more references to the shared memory object exist, the link count is decremented, and the removal of the shared memory segment is postponed until all open and map references have been removed.

Returns:

0
Success
-1
An error occurred. errno is set to indicate the error.

Errors:

EACCES
Permission to unlink the shared memory object is denied.
EINVAL
You're trying to unlink physical memory.
ENAMETOOLONG
The length of the name argument exceeds NAME_MAX.
ENOENT
The named shared memory object doesn't exist, or the name argument points to an empty string.
ENOSYS
The shm_unlink() function isn't supported by this implementation.

Classification:

POSIX 1003.4

Safety:
Interrupt handler No
Signal handler Yes, but modifies errno
Thread Yes

See also:

errno, mmap(), munmap(), mprotect(), shm_open()


[Previous]
[Contents]
[Next]