The previous 5 seconds might have been appropriate on old, heavy
loaded systems, but they will hardly be necessary on modern ones.
j = errno;
close(fd);
- sleep(5);
+ sleep(1);
}
close(fd);
if (stat(lkinfo.curlock, &st) == -1) {
if (i++ > 5)
return -1;
- sleep(5);
+ sleep(1);
} else {
time_t curtime;
i = 0;
if (curtime > st.st_ctime + RSECS)
unlink(lkinfo.curlock);
else
- sleep(5);
+ sleep(1);
}
lockname(file, &lkinfo, 1);
}
#endif
case ETXTBSY:
i = errno;
- sleep(5);
+ sleep(1);
continue;
default: