Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/shm_unlink.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/shm_unlink.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/shm_unlink.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/shm_unlink.html on line 8

shm_unlink()

Remove a shared memory object

Synopsis:

#include <sys/mman.h>

int shm_unlink( const char * name );

Arguments:

name
The name of the shared memory object that you want to remove.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The shm_unlink() function removes the name of the shared memory object specified by name. After removing the name, you can't use shm_open() to access the object.

This function doesn't affect any references to the shared memory object (i.e. file descriptors or memory mappings). If more than one reference to the shared memory object exists, then the link count is decremented, but the shared memory segment isn't actually removed until you remove all open and map references to it.

Returns:

0
Success.
-1
An error occurred (errno is set).

Errors:

EACCES
Permission to unlink the shared memory object is denied.
ELOOP
Too many levels of symbolic links or prefixes.
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.

Examples:

See shm_open().

Classification:

POSIX 1003.1 SHM

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

mmap(), munmap(), mprotect(), shm_ctl(), shm_ctl_special(), shm_open()


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/shm_unlink.html on line 170

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/shm_unlink.html on line 170