int sem_unlink (
const char *name) ;
The sem_unlink function remove a semaphore named by the string name. If the semaphore is referenced by other processes, sem_unlink does not change the state of the semaphore.
If other processes have the semaphore open when sem_unlink is called, the semaphore is not destroyed until all references to the semaphore have been destroyed by calls to sem_close. The sem_unlink function returns immediately; it does not wait untill all references have been destroyed.
Calls to sem_open to recreate or reconnect to the semaphore refer to a new semaphore after sem_unlink is called.
On a successful call, a value of 0 is returned. Otherwise, a value of -1 is returned and errno is set to indicate that an error occurred.
The sem_unlink function fails under the following conditions:
Functions: sem_close(3), sem_open(3) delim off