Skip to content

Commit 9169e2c

Browse files
committed
mention open file descriptor locks
1 parent cd92c18 commit 9169e2c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

synchro.tex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,10 @@
425425
update, and then calls \texttt{getpwnam}(3) to retrieve a record,
426426
the lock will be lost because \texttt{getpwnam}(3) opens, reads, and
427427
closes the password database.}
428+
429+
Linux contains a different kind of locking called \emph{Open file description
430+
locks} that avoids this problem (the per file descriptor locks are released
431+
only on the last close), however does not provide deadlock detection.
428432
\item The \texttt{lockf} function (SUSv3) is simpler variant of
429433
\texttt{fcntl}, specifies only how to lock and how many bytes from the current
430434
position in the file. Very often implemented as \texttt{fcntl} wrapper.

0 commit comments

Comments
 (0)