The ERRORS section could be clearer as to what error you get when
you try to lock a socket/fifo.

 - todd

Index: lib/libc/gen/lockf.3
===================================================================
RCS file: /cvs/src/lib/libc/gen/lockf.3,v
retrieving revision 1.13
diff -u -p -u -r1.13 lockf.3
--- lib/libc/gen/lockf.3        5 Jun 2013 03:39:22 -0000       1.13
+++ lib/libc/gen/lockf.3        25 Jun 2019 15:10:47 -0000
@@ -201,7 +201,8 @@ and the section is already locked by ano
 .It Bq Er EBADF
 The argument
 .Fa filedes
-is not a valid open file descriptor.
+is not a valid open file descriptor or it
+refers to an object other than a file.
 .Pp
 The argument
 .Fa function
Index: lib/libc/sys/flock.2
===================================================================
RCS file: /cvs/src/lib/libc/sys/flock.2,v
retrieving revision 1.20
diff -u -p -u -r1.20 flock.2
--- lib/libc/sys/flock.2        10 Dec 2014 19:19:00 -0000      1.20
+++ lib/libc/sys/flock.2        25 Jun 2019 15:09:27 -0000
@@ -133,7 +133,9 @@ The argument
 .Fa operation
 has an invalid value.
 .It Bq Er EOPNOTSUPP
-The referenced descriptor is not of the correct type.
+The argument
+.Fa fd
+refers to an object other than a file.
 .El
 .Sh SEE ALSO
 .Xr close 2 ,
Index: lib/libc/sys/fcntl.2
===================================================================
RCS file: /cvs/src/lib/libc/sys/fcntl.2,v
retrieving revision 1.32
diff -u -p -u -r1.32 fcntl.2
--- lib/libc/sys/fcntl.2        10 Nov 2018 11:54:03 -0000      1.32
+++ lib/libc/sys/fcntl.2        25 Jun 2019 15:13:45 -0000
@@ -427,7 +427,7 @@ segment of a file to be locked is alread
 exclusive-locked by another process.
 .It Bq Er EBADF
 .Fa fd
-is not a valid open file descriptor.
+is not a valid open file descriptor or is not of the correct type.
 .Pp
 The argument
 .Fa cmd

Reply via email to