Phalanger icon indicating copy to clipboard operation
Phalanger copied to clipboard

flock() is not working in Mono/Linux

Open kripper opened this issue 7 years ago • 4 comments

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.

kripper avatar Apr 11 '17 04:04 kripper

any cross-platform .NET api for that ?

jakubmisek avatar Apr 11 '17 07:04 jakubmisek

Sure, maybe https://github.com/sjmelia/flock

kripper avatar Apr 11 '17 09:04 kripper

sjmelia/flock uses pinvoke and linux/win32 only ... we would need a nuget package targeting netstandard1.5 and net46

jakubmisek avatar Apr 11 '17 09:04 jakubmisek

See: https://www.nuget.org/packages/Flock

kripper avatar Mar 17 '18 13:03 kripper