On Tue, 13 Jun 2006, William A.(Andy) Adamson wrote: > hi. > > from man fcntl > > EACCES or EAGAIN > Operation is prohibited by locks held by other processes. Or, > operation is prohibited because the file has been memory-mapped > by another process. > > a process with file open for writing is essentially holding a lock WRT > allowing a read lease, so i think EAGAIN is the appropriate error. > > its not prohibited in this case by another process... > again from man fcntl > > EINVAL For F_DUPFD, arg is negative or is greater than the maximum > allowable value. For F_SETSIG, arg is not an allowable signal > number. > > the arguments to the fcntl setlease call are correct, not invalid, so this is > the wrong error. > > -->Andy does EBADF make more sense then? from the manpage: EBADF fd is not an open file descriptor, or the command was F_SETLK or F_SETLKW and the file descriptor open mode doesnâ??t match with the type of lock requested. -Jason