Lines Matching refs:urandom_cache
295 } urandom_cache = { -1 }; variable
334 if (urandom_cache.fd >= 0) { in dev_urandom()
336 fstat_result = _Py_fstat_noraise(urandom_cache.fd, &st); in dev_urandom()
341 || st.st_dev != urandom_cache.st_dev in dev_urandom()
342 || st.st_ino != urandom_cache.st_ino) { in dev_urandom()
346 urandom_cache.fd = -1; in dev_urandom()
349 if (urandom_cache.fd >= 0) in dev_urandom()
350 fd = urandom_cache.fd; in dev_urandom()
362 if (urandom_cache.fd >= 0) { in dev_urandom()
366 fd = urandom_cache.fd; in dev_urandom()
374 urandom_cache.fd = fd; in dev_urandom()
375 urandom_cache.st_dev = st.st_dev; in dev_urandom()
376 urandom_cache.st_ino = st.st_ino; in dev_urandom()
425 if (urandom_cache.fd >= 0) { in dev_urandom_close()
426 close(urandom_cache.fd); in dev_urandom_close()
427 urandom_cache.fd = -1; in dev_urandom_close()