# Use \`flock\` instead of \`fcntl\` to lock files · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/ea6525797d0db83a8560179b317837cb58634049)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: ea6525797d0db83a8560179b317837cb58634049

Requested commit: ea6525797d0db83a8560179b317837cb58634049

Commit: ea6525797d0db83a8560179b317837cb58634049

Tree: 48a190000f83ba3303a9a3cae797430303c883b9

Author: LeRoyce Pearson

Committer: LeRoyce Pearson

## Message

```
Use `flock` instead of `fcntl` to lock files

`flock` locks based on the file handle, instead of the process id.
This brings the file locking on unix based systems closer to file
locking on Windows.

```

## Parents

- [e7cf3f92a98cd2bd94d9d94fb361819b6ab89e8d](https://git.cafe/gitcafe/zig/commit/e7cf3f92a98cd2bd94d9d94fb361819b6ab89e8d?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/ea6525797d0db83a8560179b317837cb58634049?format=markdown)
