]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/sem_unlink.3
Many pages: Use correct letter case in page titles (TH)
[thirdparty/man-pages.git] / man3 / sem_unlink.3
CommitLineData
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
7sem_unlink \- remove a named semaphore
fba004fe
AC
8.SH LIBRARY
9POSIX 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 ()
19removes the named semaphore referred to by
c030aa56 20.IR name .
2c731798 21The semaphore name is removed immediately.
c13182ef 22The semaphore is destroyed once all other processes that have
2c731798
MK
23the semaphore open close it.
24.SH RETURN VALUE
25On success
26.BR sem_unlink ()
27returns 0; on error, \-1 is returned, with
c13182ef 28.I errno
2c731798
MK
29set to indicate the error.
30.SH ERRORS
31.TP
32.B EACCES
33The caller does not have permission to unlink this semaphore.
34.TP
35.B ENAMETOOLONG
0daa9e92 36.I name
2c731798
MK
37was too long.
38.TP
39.B ENOENT
40There is no semaphore with the given
41.IR name .
ef0a5e73 42.SH ATTRIBUTES
ee9482f4
PH
43For 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
48allbox;
c466875e 49lbx lb lb
ee9482f4
PH
50l l l.
51Interface Attribute Value
52T{
ef0a5e73 53.BR sem_unlink ()
ee9482f4
PH
54T} Thread safety MT-Safe
55.TE
c466875e
MK
56.hy
57.ad
58.sp 1
3113c7f3 59.SH STANDARDS
14375f3f 60POSIX.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)