Why does the POSIX C shared memory IPC API requires permissions (read/write) in multiple places?
I’m trying to use the POSIX shared memory IPC API in C, which basically follows the pattern shm_open() -> ftruncate() -> mmap() -> use -> munmap() -> shm_unlink()
(the latter two being optional IIUC). I noticed that the first two calls requires you different flags specifying permissions and options, but I can’t figure out the difference. From the man pages: