Lines Matching refs:fd
53 random_globals_p->fd = -1; in random_globals_ctor()
58 if (random_globals_p->fd > 0) { in random_globals_dtor()
59 close(random_globals_p->fd); in random_globals_dtor()
60 random_globals_p->fd = -1; in random_globals_dtor()
148 int fd = RANDOM_G(fd); in php_random_bytes()
151 if (fd < 0) { in php_random_bytes()
153 fd = open("/dev/urandom", O_RDONLY); in php_random_bytes()
155 if (fd < 0) { in php_random_bytes()
162 if (fstat(fd, &st) != 0 || in php_random_bytes()
169 close(fd); in php_random_bytes()
175 RANDOM_G(fd) = fd; in php_random_bytes()
179 n = read(fd, bytes + read_bytes, size - read_bytes); in php_random_bytes()