STINNER Victor added the comment: Christian Heimes added the comment: > I'm -1 on a block=True/False parameter. It makes the API more awkward and > will make people move away from os.urandom() to a self-made RNG because they > perceive os.urandom() as potential blocking.
Are you against the feature of the API (function name/parameter name)? If it's just the API, could you please propose something better? > Victor, you can use sysctl on all BSD and Linux to check if the RNG has been > seeded. On Linux it is kernel.random.entropy_avail >= > kernel.random.read_wakeup_threshold. On BSD it is kern.random.sys.seeded == 1. I know for BSD, but I failed to find a way to get access to a FreeBSD where kern.random.sys.seeded is still zero. For Linux, is kernel.random.entropy_avail related to /dev/random? In my tests, reading from /dev/urandom never blocks even before urandom is initialized. => see msg267974 ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27266> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com