summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/lockf.3
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2004-05-17 23:09:10 +0000
committeryar <yar@FreeBSD.org>2004-05-17 23:09:10 +0000
commit75331fe5be2c94da9c5ef4db51ded9f039f78410 (patch)
treec91b8ed3b77526e170afd00035d74d30b0184dd5 /lib/libc/gen/lockf.3
parent7730ed4e269438738132eddf46a10fcec2e1a0f4 (diff)
downloadFreeBSD-src-75331fe5be2c94da9c5ef4db51ded9f039f78410.zip
FreeBSD-src-75331fe5be2c94da9c5ef4db51ded9f039f78410.tar.gz
Clarify and extend paragraphs on interoperation
of fcntl(2), flock(2), and lockf(3) advisory locks. Add such a paragraph to the flock(2) manpage for the sake of consistency. Reviewed by: Cyrille Lefevre and Kirk McKusick on -arch MFC after: 2 weeks
Diffstat (limited to 'lib/libc/gen/lockf.3')
-rw-r--r--lib/libc/gen/lockf.316
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/libc/gen/lockf.3 b/lib/libc/gen/lockf.3
index abb00ac..63cf669 100644
--- a/lib/libc/gen/lockf.3
+++ b/lib/libc/gen/lockf.3
@@ -173,10 +173,22 @@ error.
.Pp
The
.Fn lockf ,
-.Xr fcntl 2
+.Xr fcntl 2 ,
and
.Xr flock 2
-locks may be safely used concurrently.
+locks are compatible.
+Processes using different locking interfaces can cooperate
+over the same file safely.
+However, only one of such interfaces should be used within
+the same process.
+If a file is locked by a process through
+.Xr flock 2 ,
+any record within the file will be seen as locked
+from the viewpoint of another process using
+.Xr fcntl 2
+or
+.Fn lockf ,
+and vice versa.
.Pp
Blocking on a section is interrupted by any signal.
.Sh RETURN VALUES
OpenPOWER on IntegriCloud