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  at‐
34       tributes(7).
35
36       ┌────────────────────────────────────────────┬───────────────┬─────────┐
37Interface                                   Attribute     Value   
38       ├────────────────────────────────────────────┼───────────────┼─────────┤
39sem_unlink()                                │ Thread safety │ MT-Safe │
40       └────────────────────────────────────────────┴───────────────┴─────────┘
41

CONFORMING TO

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

SEE ALSO

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

COLOPHON

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