hpux man page for sem_unlink

Query: sem_unlink

OS: hpux

Section: 2

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

sem_unlink(2)							System Calls Manual						     sem_unlink(2)

NAME
sem_unlink - unlink a named POSIX semaphore
SYNOPSIS
DESCRIPTION
is used to unlink named semaphores. A successful call to marks the semaphore, specified by name, for removal. Calling does not affect processes, including the calling process, which currently have a descriptor, obtained from a call to Named semaphores are uniquely identi- fied by character strings. All character string names will be pre-processed to ensure variations of a pathname resolve to the same sema- phore name. If the semaphore is successfully marked for removal by a call to the semaphore will be removed when all processes remove their descriptors to the specified semaphore by calling Subsequent calls to using the string name will refer to a new semaphore. To use this function, link in the realtime library by specifying on the compiler or linker command line.
EXAMPLES
The following call to will remove the named semaphore named by the string name. If the semaphore is currently referenced by one or more processes, the semaphore will be marked for removal and removed when there are no more processes referencing it.
RETURN VALUE
If the semaphore was unlinked successfully, returns 0. If the semaphore could not be unlinked, the call returns -1 and sets to indicate the error.
ERRORS
fails and does not perform the requested operation if any of the following conditions are encountered: [EACCES] The named semaphore exists and the process does not have the permissions to unlink the semaphore. [ENAMETOOLONG] The name string is longer than [ENOENT] The flag is not set in oflag (see sem_open(2)) and the named semaphore does not exist.
SEE ALSO
sem_close(2), sem_open(2), privileges(5), <semaphore.h>.
STANDARDS CONFORMANCE
sem_unlink(2)
Related Man Pages
sem_close(3c) - opensolaris
sem_unlink(3c) - opensolaris
sem_init(2) - hpux
sem_unlink(3) - netbsd
sem_close(3rt) - sunos
Similar Topics in the Unix Linux Community
query reg semaphore / processes on solaris
semaphore access speed
Determining which processes hold a semaphore
How to implement a semaphore with pedestrian pushbutton
Semaphores problem