The previous method, using fcntl byterange locks, was very efficient and avoided unnecessarily filesystem metadata churn (ie. creating/deleting inodes). Unfortunately, MacOS X (at least version 10.6.5) apparently has a race condition in its fcntl locking that makes it unusably unreliable (http://apenwarr.ca/log/?m=201012#13). My tests indicate that if you only ever lock a *single* byterange on a file, the race condition doesn't cause a problem. So let's just use one lockfile per target. Now "redo -j20 test" passes for me on both MacOS and Linux. This doesn't measurably affect the speed on Linux, at least, in my tests. The bad news: it's hard to safely *delete* those lockfiles when we're done with them, so they tend to accumulate in the .redo dir. |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| check-1.sh | ||
| check-2.sh | ||
| clean.do | ||
| countall.do | ||
| default.n0.do | ||
| default.n1.do | ||
| default.n2.do | ||
| Makefile | ||
| seq | ||
| test.do | ||