I feel this misses a point or two. flock() came from BSD. F_SETLK came from system v (iirc). flock() was too limited (no fine granularity), and F_SETLK was broken by design. And Mand locking never worked properly on Linux (or anywhere(?)). F_OFD_SETLK attempts to improve on both.
-
-
- 1 more reply
New conversation -
-
-
Yes it's the Unix philosophy that everything is a file lock.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
orthogonal means none of them are compatible with each other, right?
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
In all fairness, this was implemented badly originally, and subsequent "improvements" were targeted at fixing local problems. "Polishing a turd" is really the right expression.
-
does “this” refer to linux?
-
File locking. The svr4 interface got fd behavior all wrong, almost everyone got it wrong over NFS (but not Solaris 7 and after iirc). BSD version was ok, but ignored NFS. Hard to use and error prone as a result.
End of conversation
New conversation -
-
-
Yeah but then
@mkerrisk documents everything and teaches classes!Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
That’s the difference between a philosophy and a discipline.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
i've been using git as my go-to example of the unix philosophy, this is as good
-
useradd/adduser heh
End of conversation
New conversation -
-
-
andy this is a very good tweet
#verygoodtweetawardThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Luckily curse day only hit the brain this year. Could have been worse!
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
don't forget MAP_DENYWRITE, which is present in all(?) linux kernels and effectively produces mandatory locking
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
The joys of endless compatibility. Always be deprecating.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Unix: LOCK ALL THE THINGS!
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
There's a fairly common development philosophy that focusses on making the easy things easier while the hard things get harder. Unix style development may appear fragmented but at least there's a noticeable tendency toward making hard things easier.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
So you write some
#ifdefs which you hope will abstract the beastliness. Now it's your problem!Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Picky picky picky
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.