Test Plan: Tests under folly passed
Reviewed By: seanc@fb.com
Subscribers: trunkagent, seanc, njormrod
FB internal diff:
D1600266
Tasks:
5317470
namespace {
-// Keep it open for the duration of the program
-File randomDevice("/dev/urandom");
-
void readRandomDevice(void* data, size_t size) {
+ // Keep it open for the duration of the program
+ static File randomDevice("/dev/urandom");
PCHECK(readFull(randomDevice.fd(), data, size) == size);
}