Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set the right flags when
Shared
is selected.
`exclusive` selects between `LOCK_EX` and `LOCK_SH` but if it is `false` `LOCK_SH` is never set on the flags. This could've worked if `LOCK_SH` is `0` but at least on GNU/Linux on amd64 with glibc, `LOCK_SH` is `1`. We never use `Shared` in the Dune codebase but in case we would, it better works otherwise it would create issues that are hard to debug. Discovered by @emillon as we were investigating the semantics of write locks. Signed-off-by: Marek Kubica <[email protected]>
- Loading branch information