]>
Commit | Line | Data |
---|---|---|
c11b1abf | 1 | .\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com> |
2c731798 | 2 | .\" |
5fbde956 | 3 | .\" SPDX-License-Identifier: Linux-man-pages-copyleft |
2c731798 | 4 | .\" |
4c1c5274 | 5 | .TH sem_unlink 3 (date) "Linux man-pages (unreleased)" |
2c731798 MK |
6 | .SH NAME |
7 | sem_unlink \- remove a named semaphore | |
fba004fe AC |
8 | .SH LIBRARY |
9 | POSIX threads library | |
8fc3b2cf | 10 | .RI ( libpthread ", " \-lpthread ) |
2c731798 MK |
11 | .SH SYNOPSIS |
12 | .nf | |
13 | .B #include <semaphore.h> | |
68e4db0a | 14 | .PP |
2c731798 MK |
15 | .BI "int sem_unlink(const char *" name ); |
16 | .fi | |
17 | .SH DESCRIPTION | |
18 | .BR sem_unlink () | |
19 | removes the named semaphore referred to by | |
c030aa56 | 20 | .IR name . |
2c731798 | 21 | The semaphore name is removed immediately. |
c13182ef | 22 | The semaphore is destroyed once all other processes that have |
2c731798 MK |
23 | the semaphore open close it. |
24 | .SH RETURN VALUE | |
25 | On success | |
26 | .BR sem_unlink () | |
27 | returns 0; on error, \-1 is returned, with | |
c13182ef | 28 | .I errno |
2c731798 MK |
29 | set to indicate the error. |
30 | .SH ERRORS | |
31 | .TP | |
32 | .B EACCES | |
33 | The caller does not have permission to unlink this semaphore. | |
34 | .TP | |
35 | .B ENAMETOOLONG | |
0daa9e92 | 36 | .I name |
2c731798 MK |
37 | was too long. |
38 | .TP | |
39 | .B ENOENT | |
40 | There is no semaphore with the given | |
41 | .IR name . | |
ef0a5e73 | 42 | .SH ATTRIBUTES |
ee9482f4 PH |
43 | For an explanation of the terms used in this section, see |
44 | .BR attributes (7). | |
c466875e MK |
45 | .ad l |
46 | .nh | |
ee9482f4 PH |
47 | .TS |
48 | allbox; | |
c466875e | 49 | lbx lb lb |
ee9482f4 PH |
50 | l l l. |
51 | Interface Attribute Value | |
52 | T{ | |
ef0a5e73 | 53 | .BR sem_unlink () |
ee9482f4 PH |
54 | T} Thread safety MT-Safe |
55 | .TE | |
c466875e MK |
56 | .hy |
57 | .ad | |
58 | .sp 1 | |
3113c7f3 | 59 | .SH STANDARDS |
14375f3f | 60 | POSIX.1-2001, POSIX.1-2008. |
47297adb | 61 | .SH SEE ALSO |
2c731798 MK |
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) |