summaryrefslogtreecommitdiff
path: root/includes/ForkController.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/ForkController.php')
-rw-r--r--includes/ForkController.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/includes/ForkController.php b/includes/ForkController.php
index 448bc03b..ced45af6 100644
--- a/includes/ForkController.php
+++ b/includes/ForkController.php
@@ -53,7 +53,7 @@ class ForkController {
const RESTART_ON_ERROR = 1;
public function __construct( $numProcs, $flags = 0 ) {
- if ( php_sapi_name() != 'cli' ) {
+ if ( PHP_SAPI != 'cli' ) {
throw new MWException( "ForkController cannot be used from the web." );
}
$this->procsToStart = $numProcs;
@@ -121,7 +121,9 @@ class ForkController {
if ( function_exists( 'pcntl_signal_dispatch' ) ) {
pcntl_signal_dispatch();
} else {
- declare (ticks=1) { $status = $status; }
+ declare( ticks = 1 ) {
+ $status = $status;
+ }
}
// Respond to TERM signal
if ( $this->termReceived ) {
@@ -140,7 +142,7 @@ class ForkController {
// Don't share DB, storage, or memcached connections
wfGetLBFactory()->destroyInstance();
FileBackendGroup::destroySingleton();
- LockManagerGroup::destroySingleton();
+ LockManagerGroup::destroySingletons();
ObjectCache::clear();
$wgMemc = null;
}