Skip to content
Advertisement

Tag: semaphore

How to display the process currently holding a semaphore?

In userspace Linux, I have a process blocking on a semaphore, as found by strace. Once the error condition occurs, the blocking is repeatable, so there must be another process that holds the semaphore and did not release it. Is there a way to know which other process is currently holding the semaphore? ipcs lists the semaphore, so does /proc/sysvipc/sem.

Advertisement