DEVSENSE / Phalanger

PHP 5.4 compiler for .NET/Mono frameworks. Predecessor to the opensource PeachPie project (www.peachpie.io).
http://v4.php-compiler.net/
Apache License 2.0
382 stars 94 forks source link

flock() is not working in Mono/Linux #81

Open kripper opened 7 years ago

kripper commented 7 years ago

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.

jakubmisek commented 7 years ago

any cross-platform .NET api for that ?

kripper commented 7 years ago

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

jakubmisek commented 7 years ago

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

kripper commented 6 years ago

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