for ($i = 1; $i <= $this->threads; $i++) {
$pid = pcntl_fork();
if ($pid < 0) {
- $this->log(LOG_ERROR, "Couldn't fork for thread $i; aborting\n");
+ $this->log(LOG_ERR, "Couldn't fork for thread $i; aborting\n");
exit(1);
} else if ($pid == 0) {
$this->initAndRunChild($i);
$pid = pcntl_fork();
if ($pid < 0) {
- $this->log(LOG_ERROR, "Couldn't fork to respawn thread $i; aborting thread.\n");
+ $this->log(LOG_ERR, "Couldn't fork to respawn thread $i; aborting thread.\n");
} else if ($pid == 0) {
$this->initAndRunChild($i);
} else {
$this->parentWriter = $sockets[0];
$this->parentReader = $sockets[1];
} else {
- $this->log(LOG_ERROR, "Couldn't create inter-process sockets");
+ $this->log(LOG_ERR, "Couldn't create inter-process sockets");
exit(1);
}
}
// Reconnect main memcached, or threads will stomp on
// each other and corrupt their requests.
- $cache = common_memcache();
+ $cache = Cache::instance();
if ($cache) {
$cache->reconnect();
}