1SEM_UNLINK(3) Linux Programmer's Manual SEM_UNLINK(3)
2
3
4
6 sem_unlink - remove a named semaphore
7
9 #include <semaphore.h>
10
11 int sem_unlink(const char *name);
12
13 Link with -pthread.
14
16 sem_unlink() removes the named semaphore referred to by name. The sem‐
17 aphore name is removed immediately. The semaphore is destroyed once
18 all other processes that have the semaphore open close it.
19
21 On success sem_unlink() returns 0; on error, -1 is returned, with errno
22 set to indicate the error.
23
25 EACCES The caller does not have permission to unlink this semaphore.
26
27 ENAMETOOLONG
28 name was too long.
29
30 ENOENT There is no semaphore with the given name.
31
33 POSIX.1-2001.
34
36 sem_getvalue(3), sem_open(3), sem_post(3), sem_wait(3), sem_overview(7)
37
39 This page is part of release 3.53 of the Linux man-pages project. A
40 description of the project, and information about reporting bugs, can
41 be found at http://www.kernel.org/doc/man-pages/.
42
43
44
45Linux 2012-05-13 SEM_UNLINK(3)