diff options
| author | LeRoyce Pearson <leroycepearson@geemili.xyz> | 2020-04-02 22:57:02 -0600 |
|---|---|---|
| committer | LeRoyce Pearson <leroycepearson@geemili.xyz> | 2020-04-02 22:57:02 -0600 |
| commit | ea6525797d0db83a8560179b317837cb58634049 (patch) | |
| tree | 48a190000f83ba3303a9a3cae797430303c883b9 /lib/std/fs | |
| parent | e7cf3f92a98cd2bd94d9d94fb361819b6ab89e8d (diff) | |
| download | zig-ea6525797d0db83a8560179b317837cb58634049.tar.gz zig-ea6525797d0db83a8560179b317837cb58634049.zip | |
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.
Diffstat (limited to 'lib/std/fs')
| -rw-r--r-- | lib/std/fs/file.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/fs/file.zig b/lib/std/fs/file.zig index 52b33d5660..63ec013dda 100644 --- a/lib/std/fs/file.zig +++ b/lib/std/fs/file.zig @@ -34,7 +34,7 @@ pub const File = struct { else => 0o666, }; - pub const OpenError = windows.CreateFileError || os.OpenError || os.FcntlError; + pub const OpenError = windows.CreateFileError || os.OpenError || os.FlockError; /// TODO https://github.com/ziglang/zig/issues/3802 pub const OpenFlags = struct { |
