fuser
fuser copied to clipboard
Support BSD style locks
libfuse has a separate flock() method for setting BSD style locks. This is necessary because the semantics are different and BSD locks are independent from POSIX locks.
Notes:
The lk_flags field must be checked, like libfuse does: https://github.com/libfuse/libfuse/blob/e032ca7a88afe1a7cd028ca63e2993af9c0b91af/lib/fuse_lowlevel.c#L1648
Useful links on lock behavior:
- https://gavv.github.io/articles/file-locks/
- http://0pointer.de/blog/projects/locking.html
- https://loonytek.com/2015/01/15/advisory-file-locking-differences-between-posix-and-bsd-locks/