(hdb_lock): also ignore EAGAIN as a locking retry error.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19168 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-11-28 09:27:38 +00:00
parent 997dc9aebb
commit 4ccac57389

View File

@@ -114,7 +114,7 @@ hdb_lock(int fd, int operation)
for(i = 0; i < 3; i++){
code = flock(fd, (operation == HDB_RLOCK ? LOCK_SH : LOCK_EX) | LOCK_NB);
if(code == 0 || errno != EWOULDBLOCK)
if(code == 0 || errno != EWOULDBLOCK || errno != EAGAIN)
break;
sleep(1);
}