diff --git a/libcperciva/util/entropy.c b/libcperciva/util/entropy.c index d9454ee4..e84b2c2f 100644 --- a/libcperciva/util/entropy.c +++ b/libcperciva/util/entropy.c @@ -77,6 +77,8 @@ entropy_read_fill(struct entropy_read_cookie * er, uint8_t * buf, /* Read bytes until we have filled the buffer. */ while (buflen > 0) { if ((lenread = read(er->fd, buf, buflen)) == -1) { + if (errno == EINTR) + continue; warnp("read(/dev/urandom)"); goto err0; }