| ... | @@ -46,8 +46,11 @@ pub const File = struct { | ... | @@ -46,8 +46,11 @@ pub const File = struct { |
| 46 | /// the file is opened with a shared lock, allowing the other processes to read from the | 46 | /// the file is opened with a shared lock, allowing the other processes to read from the |
| 47 | /// file, but not to write to the file. | 47 | /// file, but not to write to the file. |
| 48 | /// | 48 | /// |
| 49 | /// Note that the lock is only advisory on Linux. This means that a process that does not | 49 | /// Note that the lock is only advisory on Linux, except in very specific cirsumstances[1]. |
| 50 | /// respect the locking API can still read and write to the file, despite the lock. | 50 | /// This means that a process that does not respect the locking API can still read and write |
| | 51 | /// to the file, despite the lock. |
| | 52 | /// |
| | 53 | /// [1]: https://www.kernel.org/doc/Documentation/filesystems/mandatory-locking.txt |
| 51 | lock: bool = false, | 54 | lock: bool = false, |
| 52 | | 55 | |
| 53 | /// This prevents `O_NONBLOCK` from being passed even if `std.io.is_async`. | 56 | /// This prevents `O_NONBLOCK` from being passed even if `std.io.is_async`. |
| ... | @@ -71,8 +74,11 @@ pub const File = struct { | ... | @@ -71,8 +74,11 @@ pub const File = struct { |
| 71 | | 74 | |
| 72 | /// Prevent other files from accessing this file while this process has it is open. | 75 | /// Prevent other files from accessing this file while this process has it is open. |
| 73 | /// | 76 | /// |
| 74 | /// Note that the lock is only advisory on Linux. This means that a process that does not | 77 | /// Note that the lock is only advisory on Linux, except in very specific cirsumstances[1]. |
| 75 | /// respect the locking API can still read and write to the file, despite the lock. | 78 | /// This means that a process that does not respect the locking API can still read and write |
| | 79 | /// to the file, despite the lock. |
| | 80 | /// |
| | 81 | /// [1]: https://www.kernel.org/doc/Documentation/filesystems/mandatory-locking.txt |
| 76 | lock: bool = false, | 82 | lock: bool = false, |
| 77 | | 83 | |
| 78 | /// For POSIX systems this is the file system mode the file will | 84 | /// For POSIX systems this is the file system mode the file will |