Skip to content

Commit

Permalink
Merge pull request #9130 from Leonidas-from-XIV/shared-flock-fix
Browse files Browse the repository at this point in the history
Set the right flags when `Shared` is selected.
  • Loading branch information
Leonidas-from-XIV authored Nov 10, 2023
2 parents 39e6c72 + 29d349a commit eb0d51e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/dune_util/dune_flock.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ CAMLprim value dune_flock_lock(value v_fd, value v_block, value v_exclusive) {
int flags = 0;
if (Bool_val(v_exclusive)) {
flags |= LOCK_EX;
} else {
flags |= LOCK_SH;
}
if (!Bool_val(v_block)) {
flags |= LOCK_NB;
Expand Down

0 comments on commit eb0d51e

Please sign in to comment.