diff options
Diffstat (limited to 'flock_mmap/README.md')
-rw-r--r-- | flock_mmap/README.md | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/flock_mmap/README.md b/flock_mmap/README.md index 623fd5c..36ce390 100644 --- a/flock_mmap/README.md +++ b/flock_mmap/README.md @@ -26,7 +26,7 @@ make 2> /dev/null ``` ### Result A -- Linux +- Linux: glibc, ulibc, musl ``` ./tests.sh @@ -48,3 +48,22 @@ make 2> /dev/null [TEST]flock() and close() unlocks the file*: YES [TEST]flock() and holding unlocks the file : NO ``` + +## WHY? +Not sure. Just don't mix `mmap()` with `flock()`, I guess. + +``` +HISTORY + 4.4BSD (the flock() call first appeared in 4.2BSD). A version of + flock(), possibly implemented in terms of fcntl(2), appears on most + UNIX systems. +``` +``` +VERSIONS + Since Linux 2.0, flock() is implemented as a system call in its own + right rather than being emulated in the GNU C library as a call to fc‐ + ntl(2). With this implementation, there is no interaction between the + types of lock placed by flock() and fcntl(2), and flock() does not de‐ + tect deadlock. (Note, however, that on some systems, such as the mod‐ + ern BSDs, flock() and fcntl(2) locks do interact with one another.) +``` |