Ticket #6648: 6648_fix_random_number_generator_fcgi_fork-2.diff
File 6648_fix_random_number_generator_fcgi_fork-2.diff, 712 bytes (added by , 13 years ago) |
---|
-
django/core/handlers/wsgi.py
a b 1 1 from pprint import pformat 2 2 import sys 3 import random 3 4 from threading import Lock 4 5 try: 5 6 from cStringIO import StringIO … … 244 245 if self._request_middleware is None: 245 246 self.initLock.acquire() 246 247 try: 248 # Reseed random number generator, so that preforked processes 249 # do not share the same seed 250 random.seed() 251 247 252 try: 248 253 # Check that middleware is still uninitialised. 249 254 if self._request_middleware is None: