sysvipc(7)

๐Ÿ’– sysvipc โ€” bestie's guide to System V IPC ๐Ÿ’–

okay so you found sysvipc in section 7 of the manual (the "Miscellaneous Information Manual", aka the lore section, aka where the โœจconceptsโœจ live) and you're like "what even is this". sit down, grab a strawberry, and let me tell you about the three interprocess communication mechanisms that have been living on UNIX systems since forever and are widely available like the popular girlies they are: message queues, semaphore, and shared memory. ๐Ÿ’…


๐ŸŒˆ DESCRIPTION ๐ŸŒˆ

System V IPC is the name for those three mechanisms. That's it, that's the vibe. They're old, they're everywhere, they ate. ๐Ÿซถ

๐Ÿ’Œ Message queues

System V message queues let data get exchanged in units called messages. And here's the cute part โ€” each message can have an associated priority. slay.

no cap: if you want an alternative API that gets you the same result, POSIX message queues are right there โ€” go peek at mq_overview(7). ๐Ÿฆ‹

The System V message queue API is these system calls, and they're literally a little friend group:

  • msgget(2) โ€” creates a brand new message queue or grabs the ID of one that already exists. bestie this call returns an identifier and every other call in this group needs it, so it's the leader of the friend group. ๐Ÿ‘‘
  • msgsnd(2) โ€” adds a message to a queue. drop it in, periodt. ๐ŸŽ€
  • msgrcv(2) โ€” removes a message from a queue. take it out. ๐Ÿ’œ
  • msgctl(2) โ€” does various control operations on a queue, including deletion. yes queen, kill it. ๐Ÿ’€

๐Ÿšฆ Semaphore sets

System V semaphores let processes synchronize their actions. and ugh, the way they're allocated in groups called sets โ€” every single semaphore inside a set is a counting semaphore. so organized of them. ๐ŸŒธ

again, alternative API same result: POSIX semaphores, see sem_overview(7). โœจ

The System V semaphore API is these system calls:

  • semget(2) โ€” creates a new set or gets you the ID of an existing set. returns an identifier that the remaining APIs are gonna use. iconic. โญ
  • semop(2) โ€” performs operations on the semaphores in a set. ๐Ÿ’ซ
  • semctl(2) โ€” does various control operations on a set, including deletion. gone. bye. ๐Ÿ˜ญ

๐Ÿง  Shared memory segments

System V shared memory lets processes share a region a memory โ€” a "segment". sharing is caring fr fr. ๐Ÿ’–

and yes, POSIX shared memory is the alternative API for the same result, check shm_overview(7). ๐Ÿงš

The System V shared memory API is these system calls:

  • shmget(2) โ€” creates a new segment or obtains the ID of an existing segment. returns an identifier that the rest of the APIs use. main character energy tbh. ๐ŸŒŸ
  • shmat(2) โ€” attaches an existing shared memory object into the calling process's address space. come on in, the water's fine. ๐ŸŒŠ
  • shmdt(2) โ€” detaches a segment from the calling process's address space. leaving the party. ๐Ÿ™ˆ
  • shmctl(2) โ€” does various control operations on a segment, including deletion. ๐Ÿ”ฅ

๐Ÿซง IPC namespaces

wanna know how System V IPC objects interact with IPC namespaces? there's a whole discussion waiting for you at ipc_namespaces(7). iykyk. ๐ŸŒˆ


๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

ipcmk(1), ipcrm(1), ipcs(1), lsipc(1), ipc(2), msgctl(2), msgget(2), msgrcv(2), msgsnd(2), semctl(2), semget(2), semop(2), shmat(2), shmctl(2), shmdt(2), shmget(2), ftok(3), ipc_namespaces(7)


okay bestie that's the whole page, go forth and message queue responsibly ๐Ÿซถ๐Ÿ’…

โ€” written into Linux man-pages 6.20, dated 2026-02-08, and it's sysvipc(7) if you need to find me again โœจ๐ŸŽ€

๐Ÿ“ฆ where this page comes from
  • arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • nixpkgs unstable: man-pages 6.20
  • ๐Ÿ“œ the page's license: Linux-man-pages-copyleft
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms