Add additional Random.atfork() to prevent RNG errors in large runs

Conflicts:
	paramiko/transport.py

Was: ssh 41f4566
This commit is contained in:
Jeff Forcier 2012-09-23 14:21:22 -07:00
parent 72ee77f441
commit f8239015ec
1 changed files with 4 additions and 0 deletions

View File

@ -1505,6 +1505,10 @@ class Transport (threading.Thread):
# indefinitely, creating a GC cycle and not letting Transport ever be # indefinitely, creating a GC cycle and not letting Transport ever be
# GC'd. it's a bug in Thread.) # GC'd. it's a bug in Thread.)
# Required to prevent RNG errors when running inside many subprocess
# containers.
Random.atfork()
# Hold reference to 'sys' so we can test sys.modules to detect # Hold reference to 'sys' so we can test sys.modules to detect
# interpreter shutdown. # interpreter shutdown.
self.sys = sys self.sys = sys