Debian Codegraph @

upstream/debian-unstable/man7/sysvipc.7

raw
1 .\" Copyright 2020, Michael Kerrisk <[email protected]>
2 .\" Copyright, the authors of the Linux man-pages project
3 .\"
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .\"
6 .TH sysvipc 7 2026-02-08 "Linux man-pages 6.18"
7 .SH NAME
8 sysvipc \- System V interprocess communication mechanisms
9 .SH DESCRIPTION
10 System V IPC is the name given to three interprocess
11 communication mechanisms that are widely available on UNIX systems:
12 message queues, semaphore, and shared memory.
13 .\"
14 .SS Message queues
15 System V message queues allow data to be exchanged in units called messages.
16 Each message can have an associated priority.
17 POSIX message queues provide an alternative API for achieving the same result;
18 see
19 .BR mq_overview (7).
20 .P
21 The System V message queue API consists of the following system calls:
22 .TP
23 .BR msgget (2)
24 Create a new message queue or obtain the ID of an existing message queue.
25 This call returns an identifier that is used in the remaining APIs.
26 .TP
27 .BR msgsnd (2)
28 Add a message to a queue.
29 .TP
30 .BR msgrcv (2)
31 Remove a message from a queue.
32 .TP
33 .BR msgctl (2)
34 Perform various control operations on a queue, including deletion.
35 .\"
36 .SS Semaphore sets
37 System V semaphores allow processes to synchronize their actions.
38 System V semaphores are allocated in groups called sets;
39 each semaphore in a set is a counting semaphore.
40 POSIX semaphores provide an alternative API for achieving the same result;
41 see
42 .BR sem_overview (7).
43 .P
44 The System V semaphore API consists of the following system calls:
45 .TP
46 .BR semget (2)
47 Create a new set or obtain the ID of an existing set.
48 This call returns an identifier that is used in the remaining APIs.
49 .TP
50 .BR semop (2)
51 Perform operations on the semaphores in a set.
52 .TP
53 .BR semctl (2)
54 Perform various control operations on a set, including deletion.
55 .\"
56 .SS Shared memory segments
57 System V shared memory allows processes to share a region a memory
58 (a "segment").
59 POSIX shared memory is an alternative API for achieving the same result;
60 see
61 .BR shm_overview (7).
62 .P
63 The System V shared memory API consists of the following system calls:
64 .TP
65 .BR shmget (2)
66 Create a new segment or obtain the ID of an existing segment.
67 This call returns an identifier that is used in the remaining APIs.
68 .TP
69 .BR shmat (2)
70 Attach an existing shared memory object into the calling process's
71 address space.
72 .TP
73 .BR shmdt (2)
74 Detach a segment from the calling process's address space.
75 .TP
76 .BR shmctl (2)
77 Perform various control operations on a segment, including deletion.
78 .\"
79 .SS IPC namespaces
80 For a discussion of the interaction of System V IPC objects and
81 IPC namespaces, see
82 .BR ipc_namespaces (7).
83 .SH SEE ALSO
84 .BR ipcmk (1),
85 .BR ipcrm (1),
86 .BR ipcs (1),
87 .BR lsipc (1),
88 .BR ipc (2),
89 .BR msgctl (2),
90 .BR msgget (2),
91 .BR msgrcv (2),
92 .BR msgsnd (2),
93 .BR semctl (2),
94 .BR semget (2),
95 .BR semop (2),
96 .BR shmat (2),
97 .BR shmctl (2),
98 .BR shmdt (2),
99 .BR shmget (2),
100 .BR ftok (3),
101 .BR ipc_namespaces (7)