Searched refs:random_fd (Results 1 – 2 of 2) sorted by relevance
38 static int random_fd = -1, urandom_fd = -1; variable46 if (random_fd != -1) { in random_init()51 VERIFY((random_fd = open(RANDOM_PATH, O_RDONLY | O_CLOEXEC)) != -1); in random_init()58 close(random_fd); in random_fini()61 random_fd = -1; in random_fini()94 return (random_get_bytes_common(ptr, len, random_fd)); in random_get_bytes()
55 static int random_fd = -1; variable322 if (random_fd >= 0) { in random_close_fd()323 eloop_unregister_read_sock(random_fd); in random_close_fd()324 close(random_fd); in random_close_fd()325 random_fd = -1; in random_close_fd()438 if (random_fd >= 0) in random_init()454 random_fd = open("/dev/random", O_RDONLY | O_NONBLOCK); in random_init()455 if (random_fd < 0) { in random_init()463 eloop_register_read_sock(random_fd, random_read_fd, NULL, NULL); in random_init()