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/sem_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/sem_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/sem_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/sem_unlink.html on line 8
Destroy a named semaphore
#include <semaphore.h>
int sem_unlink( const char * sem_name );
- sem_name
- The name of the semaphore that you want to destroy.
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
The sem_unlink() function destroys the named semaphore, sem_name.
Open semaphores are removed the same way that
unlink()
removes open
files; the processes that have the semaphore open can still use it, but
the semaphore will disappear as soon as the last process uses
sem_close() to close it.
Any attempt to use
sem_open()
on an
unlinked semaphore will refer to a new semaphore.
Semaphores are persistent as long as the system remains up.
- 0
- Success.
- -1
- An error occurred (errno
is set).
- EACCESS
- You don't have permission to unlink
the semaphore.
- ELOOP
- Too many levels of symbolic links or prefixes.
- ENOENT
- The semaphore sem_name doesn't exist.
- ENAMETOOLONG
- The sem_name argument is longer than
(NAME_MAX - 8).
- ENOSYS
- The sem_unlink() function isn't implemented for the filesystem
specified in path.
POSIX 1003.1 SEM
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
sem_open(),
sem_close(),
sem_wait(),
sem_trywait(),
sem_post()
procnto*
in the Utilities Reference
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/sem_unlink.html on line 169
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/sem_unlink.html on line 169