On a Linux system with multiple processes, the semaphore system V allows the use of SEM_UNDO, preventing the semaphore from βgetting stuckβ if the process associated with the semaphore fails. What is the correct method to prevent POSIX semaphores from jamming as a result of a failure during semaphore storage? Or does POSIX guarantee that the semaphore is freed in the event of a failure?
source share