*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: sem_destroy | Section: 3 | Source: Digital UNIX | File: sem_destroy.3.gz
sem_destroy(3) Library Functions Manual sem_destroy(3) NAME sem_destroy - Destroy an unnamed semaphore (P1003.1b) SYNOPSIS #include <semaphore.h> int sem_destroy ( sem_t *sem); PARAMETERS sem References the unnamed semaphore to be destroyed. Use the sem argument originally supplied with the appropriate sem_init function. DESCRIPTION The sem_destroy function destroys an unnamed semaphore indicated by sem. Only a semaphore created using sem_init may be destroyed using sem_destroy. The potential for deadlock exists if a process calls sem_destroy for a semaphore while there is a pending sem_wait, because a process may be waiting for a poster which has not yet opened the semaphore. RETURN VALUES On successful completion, the function returns the value 0; otherwise, the function returns the value -1 and sets errno to indicate the error, without destroying the semaphore indicated by the sem argument. ERRORS The sem_destroy function fails under the following condition: [EINVAL] The sem argument is not a valid semaphore. RELATED INFORMATION Functions: sem_init(3), sem_open(3) delim off sem_destroy(3)

Navigation Options