1sem_unlink(3)              Library Functions Manual              sem_unlink(3)
2
3
4

NAME

6       sem_unlink - remove a named semaphore
7

LIBRARY

9       POSIX threads library (libpthread, -lpthread)
10

SYNOPSIS

12       #include <semaphore.h>
13
14       int sem_unlink(const char *name);
15

DESCRIPTION

17       sem_unlink() removes the named semaphore referred to by name.  The sem‐
18       aphore name is removed immediately.  The semaphore  is  destroyed  once
19       all other processes that have the semaphore open close it.
20

RETURN VALUE

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

ERRORS

26       EACCES The caller does not have permission to unlink this semaphore.
27
28       ENAMETOOLONG
29              name was too long.
30
31       ENOENT There is no semaphore with the given name.
32

ATTRIBUTES

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

STANDARDS

44       POSIX.1-2008.
45

HISTORY

47       POSIX.1-2001.
48

SEE ALSO

50       sem_getvalue(3), sem_open(3), sem_post(3), sem_wait(3), sem_overview(7)
51
52
53
54Linux man-pages 6.05              2023-07-20                     sem_unlink(3)
Impressum