namespaces.7: ffix
[man-pages.git] / man7 / sysvipc.7
blob78ddd27f6d045187d7e57056eee34a799aaa8bff
1 .\" Copyright 2020 Michael Kerrisk <mtk.manpages@gmail.com>
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
24 .\"
25 .TH SVIPC 7 2020-04-11 "Linux" "Linux Programmer's Manual"
26 .SH NAME
27 sysvipc \- System V interprocess communication mechanisms
28 .SH DESCRIPTION
29 System V IPC is the name given to three interprocess
30 communication mechanisms that are widely available on UNIX systems:
31 message queues, semaphore, and shared memory.
32 .\"
33 .SS Message queues
34 System V message queues allow data to be exchanged in units called messages.
35 Each messages can have an associated priority,
36 POSIX message queues provide an alternative API for achieving the same result;
37 see
38 .BR mq_overview (7).
39 .PP
40 The System V message queue API consists of the following system calls:
41 .TP
42 .BR msgget (2)
43 Create a new message queue or obtain the ID of an existing message queue.
44 This call returns an identifier that is used in the remaining APIs.
45 .TP
46 .BR msgsnd (2)
47 Add a message to a queue.
48 .TP
49 .BR msgrcv (2)
50 Remove a message from a queue.
51 .TP
52 .BR msgctl (2)
53 Perform various control operations on a queue, including deletion.
54 .\"
55 .SS Semaphore sets
56 System V semaphores allow processes to synchronize their actions.
57 System V semaphores are allocated in groups called sets;
58 each semaphore in a set is a counting semaphore.
59 POSIX semaphores provide an alternative API for achieving the same result;
60 see
61 .BR sem_overview (7).
62 .PP
63 The System V semaphore API consists of the following system calls:
64 .TP
65 .BR semget (2)
66 Create a new set or obtain the ID of an existing set.
67 This call returns an identifier that is used in the remaining APIs.
68 .TP
69 .BR semop (2)
70 Perform operations on the semaphores in a set.
71 .TP
72 .BR semctl (2)
73 Perform various control operations on a set, including deletion.
74 .\"
75 .SS Shared memory segments
76 System V shared memory allows processes to share a region a memory
77 (a "segment").
78 POSIX shared memory is an alternative API for achieving the same result; see
79 .BR shm_overview (7).
80 .PP
81 The System V shared memory API consists of the following system calls:
82 .TP
83 .BR shmget (2)
84 Create a new segment or obtain the ID of an existing segment.
85 This call returns an identifier that is used in the remaining APIs.
86 .TP
87 .BR shmat (2)
88 Attach an existing shared memory object into the calling process's
89 address space.
90 .TP
91 .BR shmdt (2)
92 Detach a segment from the calling process's address space.
93 .TP
94 .BR shmctl (2)
95 Perform various control operations on a segment, including deletion.
96 .\"
97 .SS IPC namespaces
98 For a discussion of the interaction of System V IPC objects and
99 IPC namespaces, see
100 .BR ipc_namespaces (7).
101 .SH SEE ALSO
102 .BR ipcmk (1),
103 .BR ipcrm (1),
104 .BR ipcs (1),
105 .BR lsipc (1),
106 .BR ipc (2),
107 .BR msgctl (2),
108 .BR msgget (2),
109 .BR msgrcv (2),
110 .BR msgsnd (2),
111 .BR semctl (2),
112 .BR semget (2),
113 .BR semop (2),
114 .BR shmat (2),
115 .BR shmctl (2),
116 .BR shmdt (2),
117 .BR shmget (2),
118 .BR ftok (3),
119 .BR ipc_namespaces (7)