You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added Flock object for automatic unlock on drop. (#2170)
* Added object for automatic unlock on drop.
* Added appropriate changelog file.
* Fixed doc error on `Flock`.
* Requested changes to make `fcntl::flock` private and OwnedFd instead of RawFd.
* Indent fix.
* Removed doc links to private item, updated imports.
* More import fixes.
* Format changes.
* Remove unused import for redox.
* Added `Flockable` trait per discussions, added tests for `Flock`.
* Simplified flock error conditionals.
* Added missing cfg flags for `Flockable`.
* Added missing cfg flags for impl of `Flockable` on `File`.
* Update src/fcntl.rs
Co-authored-by: SteveLauC <stevelauc@outlook.com>
* Updated `Flockable` comment per suggestion.
* Finalized `FlockArg` as enum and removed TODO accordingly, removed flock wrapper entirely.
* Implemented `Flockable` for `OwnedFd` as well.
* Fixed linting error.
* Updated changelog accordingly.
* Corrected errno logic in `Flock::lock`.
* Properly dropped inner type for `Flock`.
* Replaced `ManuallyDrop` with `Option` as inner `Flock` type to avoid double-free.
* Fixed linting errors.
* Removed unnecessary cfg condition, updated documentation.
* Modified Flock behavior for drop() and unlock().
* Reverted changes to original `flock()` and `FlockArg` for deprecation period, added EINVAL case if the unlock operation is given to `Flock::lock()`.
* Refactored `Flock` to wrap T directly and avoid a double-free after `unlock()` is used.
* Fixed linting errors.
* More linting fixes.
* Fixed example code for `Flock::unlock()`.
* Made requested changes.
* Removed duplicate import.
* Format change.
---------
Co-authored-by: SteveLauC <stevelauc@outlook.com>
0 commit comments