int sem_unlink(const char *name);
The sem_unlink() function removes the specified
If other process are currently referencing the specified semaphore,
sem_unlink() has no effect on the state of the semaphore.
If one or more processes have the specified semaphore open when
you call sem_unlink(), the semaphore is not removed until
all references to the semaphore has been destroyed by
sem_close(), _exit(), or
Calls to sem_open() to re-create or re-connect to
the specified semaphore refer to a new semaphore after
sem_unlink() is called.
The sem_unlink() call does not block
until all references have been destroyed; it returns immediately.
Specifies the semaphore to be removed.
When the sem_unlink() is successful, it returns 0.
Otherwise, the semaphore is unchanged, the function returns -1, and sets
errno to one of the following values:
Permission is denied to remove the named semaphore.
The length of the name string is greater than
NAME_MAX while POSIX_NO_TRUNC is in effect.
The named semaphore does not exist.
Derived from the POSIX Realtime Extension
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
- sem_close(), sem_open(), semctl(), semget(), semop()
PTC MKS Toolkit 10.3 Documentation Build 39.