mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-16 22:10:26 +00:00
Use /dev/urandom to avoid waiting for /dev/random
This commit is contained in:
parent
fd91ce08fa
commit
d404b0b1bb
2 changed files with 6 additions and 1 deletions
|
|
@ -4,6 +4,9 @@ Fixes:
|
|||
- logging: Use default platform encoding instead of hardcoded one
|
||||
of iso-8859-1.
|
||||
Closes: SF bug #2770077
|
||||
- dns: use /dev/urandom instead of /dev/random to get initial seed
|
||||
on Linux machines since the last one can block indefinitely.
|
||||
Closes: SF bug #2901667
|
||||
|
||||
5.1 "Let the right one in" (released 04.08.2009)
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@ class EntropyPool(object):
|
|||
self.next_byte = 0
|
||||
if seed is None:
|
||||
try:
|
||||
r = file('/dev/random')
|
||||
# Note that /dev/random can block indefinitely, so use
|
||||
# /dev/urandom instead.
|
||||
r = file('/dev/urandom')
|
||||
try:
|
||||
seed = r.read(16)
|
||||
finally:
|
||||
|
|
|
|||
Loading…
Reference in a new issue