in the code on page 253 of the second edition of Unix Network programming Volume II: interprocess Communication (Chinese version), the author stores the semaphore in a shared memory through mmap, and then the parent and child processes can directly manipulate the memory to obtain the semaphore (I don"t know if I understand it correctly). However, the kernel should still operate on this semaphore behind its back at this time, right? After all, the sem_wait function is called on semaphores in shared memory. Assuming I understand correctly, what"s the point of putting a semaphore in shared memory?
if what I understand is wrong, I hope seniors can point out?