ITS#3770 lockf can return either EACCES or EAGAIN

This commit is contained in:
Howard Chu 2005-06-11 19:32:03 +00:00
parent 117b686da4
commit 2cc3190c62

View file

@ -124,7 +124,7 @@ alock_test_lock ( int fd, int slot )
res = lockf (fd, F_TEST, (off_t) ALOCK_SLOT_SIZE);
if (res == -1) {
if (errno == EACCES) {
if (errno == EACCES || errno == EAGAIN) {
return ALOCK_LOCKED;
} else {
return -1;