#6648: random seed identical among preforked FastCGI instances
---------------------------------------+------------------------------------
          Reporter:  nez...@gmail.com  |         Owner:  nobody                 
         
            Status:  new               |     Milestone:                         
         
         Component:  Core framework    |       Version:  SVN                    
         
        Resolution:                    |      Keywords:  random seed fastcgi 
fcgi prefork
             Stage:  Accepted          |     Has_patch:  1                      
         
        Needs_docs:  0                 |   Needs_tests:  0                      
         
Needs_better_patch:  0                 |  
---------------------------------------+------------------------------------
Comment (by buffi):

 The current patch is broken.
 ctime() will only produce different output each second (an example output
 is 'Mon Apr 27 14:18:38 2009'), so the same process will get the same
 random seed if two requests are handed to it during the same second.

 It would be better to use something like random.seed("%d%f" % (getpid(),
 time())) , but I'm unsure if this is the correct way to fix this issue, so
 I won't submit a patch.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/6648#comment:8>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to