Phalanger
Phalanger copied to clipboard
flock() is not working in Mono/Linux
Mono is not supporting a way to lock files for Linux: http://mono.1490590.n4.nabble.com/Equivalent-to-LockFileEx-on-Linux-td1575660.html
Any idea to solve or workaround this problem?
Most of the times flock() is used when we need to prevent really bad things to happen.
any cross-platform .NET api for that ?
Sure, maybe https://github.com/sjmelia/flock
sjmelia/flock
uses pinvoke and linux/win32 only ... we would need a nuget package targeting netstandard1.5 and net46
See: https://www.nuget.org/packages/Flock