Ignore EINTR from usleep(3) in try_locks(..)

NetBSD's usleep(3) only returns -1/sets errno=EINVAL when `microseconds`
is one million or more

MFC after: 3 days
Submitted by: pho
Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
Enji Cooper 2015-11-16 04:53:13 +00:00
parent d6141d33bc
commit b14427e250

View File

@ -102,6 +102,9 @@ trylocks(int id)
(void)fcntl(fd, F_SETLKW, &fl);
if (usleep(sleeptime) < 0)
#if defined(__FreeBSD__)
if (errno != EINTR)
#endif
err(1, "usleep");
}
printf("%d: done\n", id);