On Tue, 25 Jun 2019 09:18:28 -0600, "Todd C. Miller" wrote: > The ERRORS section could be clearer as to what error you get when > you try to lock a socket/fifo.
Actually, for fcntl(2), we should be returning EINVAL, not EBADF when trying to lock a non-file. Let's fix that first. - todd Index: sys/kern/kern_descrip.c =================================================================== RCS file: /cvs/src/sys/kern/kern_descrip.c,v retrieving revision 1.185 diff -u -p -u -r1.185 kern_descrip.c --- sys/kern/kern_descrip.c 21 Jun 2019 09:39:48 -0000 1.185 +++ sys/kern/kern_descrip.c 25 Jun 2019 15:22:55 -0000 @@ -518,7 +518,7 @@ restart: break; if (fp->f_type != DTYPE_VNODE) { - error = EBADF; + error = EINVAL; break; } vp = fp->f_data;