Date: 04/29/01
- Next message: vvtk <email protected>: "[PHP-DEV] PHP 4.0 Bug #10495 Updated: Crash with ob_start();"
- Previous message: Andi Gutmans: "Re: [PHP-DEV] Output seems to be out of order"
- In reply to: Andi Gutmans: "Re: [PHP-DEV] Re: Crypt salts not random.. (fwd)"
- Next in thread: Andi Gutmans: "Re: [PHP-DEV] Re: Crypt salts not random.. (fwd)"
- Reply: Andi Gutmans: "Re: [PHP-DEV] Re: Crypt salts not random.. (fwd)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, 29 Apr 2001, Andi Gutmans wrote:
>At 09:42 PM 4/29/2001 +0200, Jani Taskinen wrote:
>
>>This is the line in question:
>>
>>php_srand(time(0) * getpid() * (php_combined_lcg() * 10000.0));
>>
>>This is now (in my patch) in RINIT and thus it is a different pid
>>it doesn't matter if the RINIT happens the same second..
>>Or did I misunderstood something? And I know it works now. :)
>>And it didn't work before. As the PID was always the same like Andi said.
>>
>>I attached the patch in case you missed it before..
>
>It's OK but in multi-threaded mode it should use "(long) tsrm_thread_id()"
>because getpid() will usually be the same. I hope the case is good enough
>and will work in all multi-threaded environments.
hmm..I wonder. That php_srand() line is the same it was before my patch..
It has had that getpid() in it for a long time. How could it have worked
on multi-threaded environments?? Something else is different on those?
--Jani
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: vvtk <email protected>: "[PHP-DEV] PHP 4.0 Bug #10495 Updated: Crash with ob_start();"
- Previous message: Andi Gutmans: "Re: [PHP-DEV] Output seems to be out of order"
- In reply to: Andi Gutmans: "Re: [PHP-DEV] Re: Crypt salts not random.. (fwd)"
- Next in thread: Andi Gutmans: "Re: [PHP-DEV] Re: Crypt salts not random.. (fwd)"
- Reply: Andi Gutmans: "Re: [PHP-DEV] Re: Crypt salts not random.. (fwd)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

