1SEM_UNLINK(3)              Linux Programmer's Manual             SEM_UNLINK(3)
2
3
4

NAME

6       sem_unlink - remove a named semaphore
7

SYNOPSIS

9       #include <semaphore.h>
10
11       int sem_unlink(const char *name);
12
13       Link with -pthread.
14

DESCRIPTION

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

RETURN VALUE

21       On success sem_unlink() returns 0; on error, -1 is returned, with errno
22       set to indicate the error.
23

ERRORS

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

ATTRIBUTES

33       For  an  explanation  of  the  terms  used   in   this   section,   see
34       attributes(7).
35
36       ┌─────────────┬───────────────┬─────────┐
37Interface    Attribute     Value   
38       ├─────────────┼───────────────┼─────────┤
39sem_unlink() │ Thread safety │ MT-Safe │
40       └─────────────┴───────────────┴─────────┘

CONFORMING TO

42       POSIX.1-2001, POSIX.1-2008.
43

SEE ALSO

45       sem_getvalue(3), sem_open(3), sem_post(3), sem_wait(3), sem_overview(7)
46

COLOPHON

48       This  page  is  part of release 5.07 of the Linux man-pages project.  A
49       description of the project, information about reporting bugs,  and  the
50       latest     version     of     this    page,    can    be    found    at
51       https://www.kernel.org/doc/man-pages/.
52
53
54
55Linux                             2015-08-08                     SEM_UNLINK(3)
Impressum