Hello hackers,
man page for flock(2) and fcntl(2) reads that a system call returns
EOPNOTSUPP if file descriptor refers to an object that does not support
file locking.
However, it seems that it is not always true. For example, if underlying
object is a device or a fifo returned error code depends on type of lock.
When I look at sources of VOP_ADVLOCK for fifo
(sys/fs/fifofs/fifo_vnops.c, fifo_advlock() function) I see
the following line:
...
return (ap->a_flags & F_FLOCK ? EOPNOTSUPP : EINVAL);
...
I.e. for freebsd locks EOPNOTSUPP error code is returned. It is correct.
But for posix locks EINVAL error code is returned. Is it correct?
Thanks you in advance,
Sergey.
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"