*** 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_close | Section: 3 | Source: Digital UNIX | File: sem_close.3.gz
sem_close(3) Library Functions Manual sem_close(3) NAME sem_close - Deallocate the specified named semaphore (P1003.1b) SYNOPSIS #include <semaphore.h> int sem_close ( sem_t *sem) ; PARAMETERS sem Pointer to the semaphore descriptor. Use the sem argument returned by the previous call to sem_open. DESCRIPTION The sem_close function makes a semaphore available for reuse by deallo- cating any system resources allocated for use by the current process for the named semaphore indicated by sem. If the semaphore has not been removed with a call to sem_unlink, sem_close does not change the current state of the semaphore. If the semaphore has been removed with a call to sem_unlink after the most recent call to sem_open with O_CREAT, the semaphore is no longer available after all processes that opened the semaphore close it. RETURN VALUES 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. ERRORS The sem_close function fails under the following condition: [EINVAL] The sem argument is not a valid semaphore descriptor. RELATED INFORMATION Functions: sem_init(3), sem_open(3), sem_unlink(3) delim off sem_close(3)

Navigation Options