Was occassionally failing due to race condition caused by mt_rand behaviour:
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Fri, 7 Aug 2009 11:01:15 +0000 (11:01 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Fri, 7 Aug 2009 11:01:15 +0000 (11:01 +0000)
cache/l10n_cache-en.cdb.tmp.1770228300
cache/l10n_cache-en.cdb.tmp.1770228300

maintenance/rebuildLocalisationCache.php

index a08efca..ab6c2e6 100644 (file)
@@ -66,7 +66,9 @@ class RebuildLocalisationCache extends Maintenance {
                        $pid = ( $threads > 1 ) ? pcntl_fork() : -1;
 
                        if ( $pid === 0 ) {
-                               // Child
+                               // Child, reseed because there is no bug in PHP:
+                               // http://bugs.php.net/bug.php?id=42465
+                               mt_srand(getmypid());
                                $this->doRebuild( $codes, $numRebuilt, $lc, $force );
                                exit();
                        } elseif ($pid === -1) {