Debian Codegraph @

upstream/debian-trixie/man3/sem_unlink.3

raw
1 '\" t
2 .\" Copyright (C) 2006 Michael Kerrisk <[email protected]>
3 .\"
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .\"
6 .TH sem_unlink 3 2024-05-02 "Linux man-pages 6.9.1"
7 .SH NAME
8 sem_unlink \- remove a named semaphore
9 .SH LIBRARY
10 POSIX threads library
11 .RI ( libpthread ", " \-lpthread )
12 .SH SYNOPSIS
13 .nf
14 .B #include <semaphore.h>
15 .P
16 .BI "int sem_unlink(const char *" name );
17 .fi
18 .SH DESCRIPTION
19 .BR sem_unlink ()
20 removes the named semaphore referred to by
21 .IR name .
22 The semaphore name is removed immediately.
23 The semaphore is destroyed once all other processes that have
24 the semaphore open close it.
25 .SH RETURN VALUE
26 On success
27 .BR sem_unlink ()
28 returns 0; on error, \-1 is returned, with
29 .I errno
30 set to indicate the error.
31 .SH ERRORS
32 .TP
33 .B EACCES
34 The caller does not have permission to unlink this semaphore.
35 .TP
36 .B ENAMETOOLONG
37 .I name
38 was too long.
39 .TP
40 .B ENOENT
41 There is no semaphore with the given
42 .IR name .
43 .SH ATTRIBUTES
44 For an explanation of the terms used in this section, see
45 .BR attributes (7).
46 .TS
47 allbox;
48 lbx lb lb
49 l l l.
50 Interface Attribute Value
51 T{
52 .na
53 .nh
54 .BR sem_unlink ()
55 T} Thread safety MT-Safe
56 .TE
57 .SH STANDARDS
58 POSIX.1-2008.
59 .SH HISTORY
60 POSIX.1-2001.
61 .SH SEE ALSO
62 .BR sem_getvalue (3),
63 .BR sem_open (3),
64 .BR sem_post (3),
65 .BR sem_wait (3),
66 .BR sem_overview (7)