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:
parent
d6141d33bc
commit
b14427e250
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user