]> git.kaiwu.me - nginx.git/commit
Win32: added per-thread random seeding.
authorRuslan Ermilov <ru@nginx.com>
Wed, 3 Aug 2016 22:15:41 +0000 (01:15 +0300)
committerRuslan Ermilov <ru@nginx.com>
Wed, 3 Aug 2016 22:15:41 +0000 (01:15 +0300)
commite62a16e8f60b7f66418eb2d4084025b98f4c3575
treef9bae7a153f8795ce9b1b69231ef66c21d0ddf77
parent38ca99cf98afb8155e3bdc37575beb0a4b1b6723
Win32: added per-thread random seeding.

The change in b91bcba29351 was not enough to fix random() seeding.
On Windows, the srand() seeds the PRNG only in the current thread,
and worse, is not inherited from the calling thread.  Due to this,
worker threads were not properly seeded.

Reported by Marc Bevand.
src/os/win32/ngx_process_cycle.c