| Index: runtime/bin/crypto_macos.cc
|
| diff --git a/runtime/bin/crypto_macos.cc b/runtime/bin/crypto_macos.cc
|
| index 36020d4a7f307e2271176e681c37915f41ade1fb..d808d416b608a571c807fa9fcfc6f97ae6396d37 100644
|
| --- a/runtime/bin/crypto_macos.cc
|
| +++ b/runtime/bin/crypto_macos.cc
|
| @@ -20,8 +20,8 @@ namespace bin {
|
| bool Crypto::GetRandomBytes(intptr_t count, uint8_t* buffer) {
|
| intptr_t fd = TEMP_FAILURE_RETRY(open("/dev/urandom", O_RDONLY));
|
| if (fd < 0) return false;
|
| - intptr_t bytes_read = read(fd, buffer, count);
|
| - close(fd);
|
| + intptr_t bytes_read = FDUtils::ReadFromBlocking(fd, buffer, count);
|
| + VOID_TEMP_FAILURE_RETRY(close(fd));
|
| return bytes_read == count;
|
| }
|
|
|
|
|