]> granicus.if.org Git - python/commit
Issue #29157: getrandom() is now preferred over getentropy()
authorVictor Stinner <victor.stinner@gmail.com>
Fri, 6 Jan 2017 10:26:01 +0000 (11:26 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Fri, 6 Jan 2017 10:26:01 +0000 (11:26 +0100)
commit2f7964393d6a17e746596918c4a272d0a5009479
tree2657f344337532e2fc060cc49d0ecb74039d5a63
parenta49a2078e84b594cc42988bf181be7cc5da66f78
Issue #29157: getrandom() is now preferred over getentropy()

The glibc now implements getentropy() on Linux using the getrandom() syscall.
But getentropy() doesn't support non-blocking mode.

Since getrandom() is tried first, it's not more needed to explicitly exclude
getentropy() on Solaris. Replace:

    if defined(HAVE_GETENTROPY) && !defined(sun)

with

    if defined(HAVE_GETENTROPY)
Python/random.c