Bug 35034 - moved autocomment-prefix between the prefix and the arrow. Follow up...
[lhc/web/wiklou.git] / includes / ForkController.php
index e5b44c2..8649fe7 100644 (file)
@@ -34,7 +34,7 @@ class ForkController {
 
        public function __construct( $numProcs, $flags = 0 ) {
                if ( php_sapi_name() != 'cli' ) {
-                       throw new MWException( "MultiProcess cannot be used from the web." );
+                       throw new MWException( "ForkController cannot be used from the web." );
                }
                $this->procsToStart = $numProcs;
                $this->flags = $flags;
@@ -49,6 +49,7 @@ class ForkController {
         * This will return 'child' in the child processes. In the parent process,
         * it will run until all the child processes exit or a TERM signal is
         * received. It will then return 'done'.
+        * @return string
         */
        public function start() {
                // Trap SIGTERM
@@ -115,15 +116,18 @@ class ForkController {
        }
 
        protected function prepareEnvironment() {
-               global $wgCaches, $wgMemc;
-               // Don't share DB or memcached connections
+               global $wgMemc;
+               // Don't share DB, storage, or memcached connections
                wfGetLBFactory()->destroyInstance();
-               $wgCaches = array();
-               unset( $wgMemc );
+               FileBackendGroup::destroySingleton();
+               ObjectCache::clear();
+               $wgMemc = null;
        }
 
        /**
         * Fork a number of worker processes.
+        *
+        * @return string
         */
        protected function forkWorkers( $numProcs ) {
                $this->prepareEnvironment();