3 .\" Wilfredo Sanchez, wsanchez@apple.com
4 .\" Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
6 .\" @APPLE_LICENSE_HEADER_START@
8 .\" The contents of this file constitute Original Code as defined in and
9 .\" are subject to the Apple Public Source License Version 1.1 (the
10 .\" "License"). You may not use this file except in compliance with the
11 .\" License. Please obtain a copy of the License at
12 .\" http://www.apple.com/publicsource and read it before using this file.
14 .\" This Original Code and all software distributed under the License are
15 .\" distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16 .\" EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17 .\" INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18 .\" FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19 .\" License for the specific language governing rights and limitations
20 .\" under the License.
22 .\" @APPLE_LICENSE_HEADER_END@
29 .Nd close a named semaphore
31 .Fd #include <semaphore.h>
33 .Fn sem_close "sem_t *sem"
35 The system resources associated with the named semaphore referenced by
37 are deallocated and the descriptor is invalidated.
41 will return 0. Otherwise, -1 is returned and
50 is not a valid semaphore descriptor.
61 is specified in the POSIX Realtime Extension (1003.1b-1993/1003.1i-1995).