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 Mitar, 13 years ago)

For Django 1.3+

  • django/core/handlers/wsgi.py

    a b  
    11from pprint import pformat
    22import sys
     3import random
    34from threading import Lock
    45try:
    56    from cStringIO import StringIO
     
    244245        if self._request_middleware is None:
    245246            self.initLock.acquire()
    246247            try:
     248                # Reseed random number generator, so that preforked processes
     249                # do not share the same seed
     250                random.seed()
     251
    247252                try:
    248253                    # Check that middleware is still uninitialised.
    249254                    if self._request_middleware is None:
Back to Top