Comments (3)
I'll be sending a PR for Plan 9 support soon.
It's not really possible to implement Lock/Unlock using the "exclusive use" bit:
Per http://man.cat-v.org/plan_9/5/stat: “Exclusive use files may be open
for I/O by only one fid at a time across all clients of the server. If a
second open is attempted, it draws an error.”
Since Lock is called on an open file, if we can't open a locked file in the first place, we never even get into the Lock function to wait for the file to be unlocked by the other client. I think go-billy will need to use an API similar to the lockedfile package to support file locking on Plan 9.
I got all the tests passing on Plan 9, but I found that running go test ./...
hangs in TestTempFileMany
and TestTempFileManyWithUtil
if we're using test cache. This is possibly a go tool bug. If I run the tests with go test -count 1 ./...
everything passes.
from go-billy.
will be great if you can do a PR
from go-billy.
@henesy I think Lock
is supposed to block until it acquires the lock (the posix implementation doesn't use LOCK_NB
with flock
). Maybe we can do something similar to the lockedfile package used by cmd/go
.
Go's internal/filelock package does not support Plan 9.
from go-billy.
Related Issues (20)
- there is a maximum global temp file limit on util and memfs HOT 2
- Comparison with afero? HOT 1
- Why is the Change interface not included in Filesystem? HOT 1
- memfs OpenFile does not work on directories HOT 2
- isCrossedBoundary incorrectly identifies path "..foo" as cross boundary
- Improve documentation HOT 1
- TempDir option HOT 1
- osfs should implement billy.Changer HOT 3
- Constructing a `memfs` from an `osfs`. HOT 2
- New release that comes with capabilities interface HOT 3
- Use spf13/afero or provide a compatibility layer? HOT 4
- Dep - Hash Mismatches HOT 1
- Building on Illumos Issue HOT 2
- memfs doesn't handle creating and opening files in directory which is a symlink
- memfs doesn't handle renaming files which share a prefix (e.g foobar.txt and foobar.txt.asc)
- storage.ReadAt doesn't read with empty arrays HOT 1
- billy.CapabilityCheck HOT 1
- memfs: fatal error: concurrent map writes HOT 1
- osfs: does not support chmod? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-billy.