2 .\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .TH sem_unlink 3 (date) "Linux man-pages (unreleased)"
8 sem_unlink \- remove a named semaphore
11 .RI ( libpthread ", " \-lpthread )
14 .B #include <semaphore.h>
16 .BI "int sem_unlink(const char *" name );
20 removes the named semaphore referred to by
22 The semaphore name is removed immediately.
23 The semaphore is destroyed once all other processes that have
24 the semaphore open close it.
28 returns 0; on error, \-1 is returned, with
30 set to indicate the error.
34 The caller does not have permission to unlink this semaphore.
41 There is no semaphore with the given
44 For an explanation of the terms used in this section, see
52 Interface Attribute Value
55 T} Thread safety MT-Safe
61 POSIX.1-2001, POSIX.1-2008.