summaryrefslogtreecommitdiffstats
path: root/man3/lockf.3
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--man3/lockf.326
1 files changed, 13 insertions, 13 deletions
diff --git a/man3/lockf.3 b/man3/lockf.3
index a4043ba..f8b005f 100644
--- a/man3/lockf.3
+++ b/man3/lockf.3
@@ -7,7 +7,7 @@
.\" Added section stuff, aeb, 2002-04-22.
.\" Corrected include file, drepper, 2003-06-15.
.\"
-.TH lockf 3 2023-07-20 "Linux man-pages 6.05.01"
+.TH lockf 3 2024-03-03 "Linux man-pages 6.7"
.SH NAME
lockf \- apply, test or remove a POSIX lock on an open file
.SH LIBRARY
@@ -16,15 +16,15 @@ Standard C library
.SH SYNOPSIS
.nf
.B #include <unistd.h>
-.PP
-.BI "int lockf(int " fd ", int " cmd ", off_t " len );
+.P
+.BI "int lockf(int " fd ", int " op ", off_t " len );
.fi
-.PP
+.P
.RS -4
Feature Test Macro Requirements for glibc (see
.BR feature_test_macros (7)):
.RE
-.PP
+.P
.BR lockf ():
.nf
_XOPEN_SOURCE >= 500
@@ -37,7 +37,7 @@ Apply, test, or remove a POSIX lock on a section of an open file.
The file is specified by
.IR fd ,
a file descriptor open for writing, the action by
-.IR cmd ,
+.IR op ,
and the section consists of byte positions
.IR pos .. pos + len \-1
if
@@ -53,7 +53,7 @@ is the current file position, and if
is zero, the section extends from the current file position to
infinity, encompassing the present and future end-of-file positions.
In all cases, the section may extend past current end-of-file.
-.PP
+.P
On Linux,
.BR lockf ()
is just an interface on top of
@@ -68,7 +68,7 @@ and
locks unspecified.
A portable application should probably avoid mixing calls
to these interfaces.
-.PP
+.P
Valid operations are given below:
.TP
.B F_LOCK
@@ -118,7 +118,7 @@ been memory-mapped by another process.
.B EBADF
.I fd
is not an open file descriptor; or
-.I cmd
+.I op
is
.B F_LOCK
or
@@ -128,7 +128,8 @@ and
is not a writable file descriptor.
.TP
.B EDEADLK
-The command was
+.I op
+was
.B F_LOCK
and this lock operation would cause a deadlock.
.TP
@@ -139,7 +140,7 @@ delivery of a signal caught by a handler; see
.TP
.B EINVAL
An invalid operation was specified in
-.IR cmd .
+.IR op .
.TP
.B ENOLCK
Too many segment locks open, lock table is full.
@@ -157,7 +158,6 @@ T{
.BR lockf ()
T} Thread safety MT-Safe
.TE
-.sp 1
.SH STANDARDS
POSIX.1-2008.
.SH HISTORY
@@ -165,7 +165,7 @@ POSIX.1-2001, SVr4.
.SH SEE ALSO
.BR fcntl (2),
.BR flock (2)
-.PP
+.P
.I locks.txt
and
.I mandatory\-locking.txt