How to list POSIX semaphores on Mac OS X

How can I list POSIX semaphore names that belong to a specific process in Mac OS X?

I know the command ipcs -s, but it seems to list System V semaphores, which I think are different from POSIX, because I don't recognize my own semaphores.

I use the functions sem_open/ sem_close/ sem_wait.

Is there a way to list the “descriptors” for a specific process, something like Process Explorer on a Windows platform?

+5
source share
1 answer

You can do it lsof -p <pid> | grep PSXSEM. lsofmay be more reliable when executing privileges, you can use sudo lsof ....

+3
source

All Articles