Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/106445
Change subject: Remove ugly code duplication in ReindexForkController ...................................................................... Remove ugly code duplication in ReindexForkController Requires I2071f04b from core Change-Id: Icf084e87dcf8cfc6bb5e314d53a02e7a08e8237e --- M includes/ReindexForkController.php 1 file changed, 0 insertions(+), 35 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/45/106445/1 diff --git a/includes/ReindexForkController.php b/includes/ReindexForkController.php index 9f2ecaa..6c24f4f 100644 --- a/includes/ReindexForkController.php +++ b/includes/ReindexForkController.php @@ -23,41 +23,6 @@ * http://www.gnu.org/copyleft/gpl.html */ class ReindexForkController extends ForkController { - /** - * @var integer number of this child or null if this is the parent - */ - var $childNumber; - /** - * Fork a number of worker processes. Have to hack ForkController to store - * the child number. - * - * @return string - */ - protected function forkWorkers( $numProcs ) { - $this->prepareEnvironment(); - - // Create the child processes - for ( $i = 0; $i < $numProcs; $i++ ) { - // Do the fork - $pid = pcntl_fork(); - if ( $pid === -1 || $pid === false ) { - echo "Error creating child processes\n"; - exit( 1 ); - } - - if ( !$pid ) { - $this->initChild(); - $this->childNumber = $i; // Hack right here. - return 'child'; - } else { - // This is the parent process - $this->children[$pid] = true; - } - } - - return 'parent'; - } - protected function prepareEnvironment() { parent::prepareEnvironment(); Connection::destroySingleton(); -- To view, visit https://gerrit.wikimedia.org/r/106445 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icf084e87dcf8cfc6bb5e314d53a02e7a08e8237e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Chad <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
