summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>1999-05-11 02:34:04 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>1999-05-11 02:34:04 +0000
commit06e6e7efcd69f7d3e17f7bbaf37d2d4cff8df36e (patch)
treebe2385570d740af77150172779a58dfb492da0c9 /lib
parent9889ac23d0f7f9b83d434442989822af0028db4a (diff)
note that close(2)'ing any file descriptor which refers to a file holding
any advisory locks will cause the file to lose its locks; from FreeBSD, verified by page 373 of APUE
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/sys/close.212
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/libc/sys/close.2 b/lib/libc/sys/close.2
index fb57ec95726..3b979a220e0 100644
--- a/lib/libc/sys/close.2
+++ b/lib/libc/sys/close.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: close.2,v 1.4 1999/02/27 21:56:11 deraadt Exp $
+.\" $OpenBSD: close.2,v 1.5 1999/05/11 02:34:03 aaron Exp $
.\" $NetBSD: close.2,v 1.5 1995/02/27 12:32:14 cgd Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993, 1994
@@ -59,7 +59,15 @@ on the last close of a
.Xr socket 2
associated naming information and queued data are discarded;
on the last close of a file holding an advisory lock
-the lock is released (see further
+the lock is released. However, the semantics of System V and
+.St -p1003.1-88
+dictate that all
+.Xr fcntl 2
+advisory record locks associated with a file for a given process
+are removed when
+.Em any
+file descriptor for that file is closed by that process (see
+further
.Xr flock 2 ) .
.Pp
When a process exits,