sysctl for named posix semaphores

Konstantin Belousov kostikbel at gmail.com
Sun Apr 30 09:56:18 UTC 2017


On Sat, Apr 29, 2017 at 09:41:00PM -0400, Drake Talley wrote:
> Ah thanks for cleaing that up; sorry for coming at it from left field.
> Really appreciate the explanation though!

Note that the fact that kernel does not support 'POSIX semaphores'
objects, does not make impossible to get some information about existing
named semaphores for the debugging purposes.

Eg. low-tech method 'ls -l /dev/SEMD*' would list files backing the
named semaphores and show the ownership information. fstat(1) -m
or procstat(8) -v show the processes which currently have specific
semaphore open (AKA mapped). Current state of the semaphore can be
inspected with any file dump tool, even with hexdump(1).

Anonymous semaphores are somewhat harder to observe.


More information about the freebsd-arch mailing list