Do forked child processes use the same semaphore?
问题 Let\'s say I create a semaphore. If I fork a bunch of child processes, will they all still use that same semaphore? Also, suppose I create a struct with semaphores inside and forked. Do all the child processes still use that same semaphore? If not, would storing that struct+semaphores in shared memory allow the child processes to use the same semaphores? I\'m really confused about how my forked child processes can use the same semaphores. 回答1: Let's say I create a semaphore. If I fork a bunch