What happens if I'm trying to set a, say, F_RDLCK lease on a file that is already open for a writing somewhere else.
fcntl(2) says
A read lease can be placed only on a file descriptor that is opened read-only.
Does it mean it should be open read-only system-wise and otherwise fcntl(2) call will fail with, presumingly EACCES? If so, is there any other way to wait for the lease to be possible other than using inotify(7) (IN_CLOSE_WRITE)?