Re:“POSIX advisory locks are broken by design”
by JdeBP on Wednesday July 25, 2018 @12:06PM
(#17610315)
Thread safety is not the issue. The issue is that multiple threads may want multiple different working directories simultaneously, for different work items. But there is one working directory for the process. This problem is partly alleviated by the ...at() family of system calls, of course.
It strikes me as particularly weird as there are notionally POSIX-conformant OSes that implement it in a way that is not atomic.