POSIX Locking (some pointers for those not already scared)
abartlet at samba.org
Fri Mar 2 03:24:39 UTC 2018
I've been working to understand locking, fork() and tdb as we move
Samba to LMDB. I had some fears before I realised that an fcntl() lock
is not kept across fork(), so the stupid behaviour on close() doesn't
matter if it is in the child.
It also doesn't matter that tdb_reopen_all() keeps the FD, as while the
file offset is shared (we work around this), the locks are not.
Others may not be aware of the standard rant about POSIX locking,
It is worth a read if you don't mind putting your brain though a
Authentication Developer, Samba Team https://samba.org
Samba Development and Support, Catalyst IT
More information about the samba-technical