about summary refs log tree commit diff
path: root/src/liballoc_system
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-05-06 03:07:00 -0700
committerbors <bors@rust-lang.org>2016-05-06 03:07:00 -0700
commita36c41912ba91435d75ab5702ed8bc30116565fe (patch)
tree21f1a06a4801fefe286ff62d41ffcd27129d5061 /src/liballoc_system
parent6301e22e157ba676b0b2477f6670ab8f954767a8 (diff)
parent61cbd07dec2d9670f170bed44f1815ea29a8a214 (diff)
downloadrust-a36c41912ba91435d75ab5702ed8bc30116565fe.tar.gz
rust-a36c41912ba91435d75ab5702ed8bc30116565fe.zip
Auto merge of #33086 - cardoe:non-blocking-rand-read, r=alexcrichton
rand: don't block before random pool is initialized

If we attempt a read with getrandom() on Linux the syscall can block
before the random pool is initialized unless the GRND_NONBLOCK flag is
passed. This flag causes getrandom() to instead return EAGAIN while the
pool is uninitialized. To avoid downstream users of crate or std
functionality that have no ability to avoid this blocking behavior this
change causes Rust to read bytes from /dev/urandom while getrandom()
would block and once getrandom() is available to use that. Fixes #32953.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Diffstat (limited to 'src/liballoc_system')
0 files changed, 0 insertions, 0 deletions