1 .\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .TH SEM_UNLINK 3 2021-03-22 "Linux man-pages (unreleased)" "Linux Programmer's Manual"
7 sem_unlink \- remove a named semaphore
10 .RI ( libpthread ", " \-lpthread )
13 .B #include <semaphore.h>
15 .BI "int sem_unlink(const char *" name );
19 removes the named semaphore referred to by
21 The semaphore name is removed immediately.
22 The semaphore is destroyed once all other processes that have
23 the semaphore open close it.
27 returns 0; on error, \-1 is returned, with
29 set to indicate the error.
33 The caller does not have permission to unlink this semaphore.
40 There is no semaphore with the given
43 For an explanation of the terms used in this section, see
51 Interface Attribute Value
54 T} Thread safety MT-Safe
60 POSIX.1-2001, POSIX.1-2008.