|
|
@@ -96,7 +96,9 @@ static int urandom_get_fd_locked(void) { |
|
|
|
return urandom_fd; |
|
|
|
} |
|
|
|
|
|
|
|
urandom_fd = open("/dev/urandom", O_RDONLY); |
|
|
|
do { |
|
|
|
urandom_fd = open("/dev/urandom", O_RDONLY); |
|
|
|
} while (urandom_fd == -1 && errno == EINTR); |
|
|
|
return urandom_fd; |
|
|
|
} |
|
|
|
|
|
|
@@ -124,7 +126,9 @@ void RAND_set_urandom_fd(int fd) { |
|
|
|
/* |RAND_set_urandom_fd| may not be called after the RNG is used. */ |
|
|
|
abort(); |
|
|
|
} |
|
|
|
urandom_fd = dup(fd); |
|
|
|
do { |
|
|
|
urandom_fd = dup(fd); |
|
|
|
} while (urandom_fd == -1 && errno == EINTR); |
|
|
|
if (urandom_fd < 0) { |
|
|
|
abort(); |
|
|
|
} |
|
|
|