Shutdown the session manager instance.

@return void
\AppserverIo\Psr\Application\ManagerInterface::stop()
356706
public function stop()
    {
        $this->getTimerServiceExecutor()->stop();
        $this->getCalendarTimerFactory()->stop();
        $this->getTimerFactory()->stop();
    }
335232
private function stopServer()
    {
        if ($this->resource !== null) {
            $this->write('Stopping PhantomJS Server.');

            // Wait till the server has been stopped.
            $max_checks = 10;
            for ($i = 0; $i < $max_checks; $i++) {
                // If we're on the last loop, and it's still not shut down, just
                // unset resource to allow the tests to finish.
                if ($i === $max_checks - 1 && proc_get_status($this->resource)['running'] === true) {
                    $this->writeln('');
                    $this->writeln('Unable to properly shutdown PhantomJS server.');
                    unset($this->resource);
                    break;
                }

                // Check if the process has stopped yet.
                if (proc_get_status($this->resource)['running'] === false) {
                    $this->writeln('');
                    $this->writeln('PhantomJS server stopped.');
                    unset($this->resource);
                    break;
                }

                foreach ($this->pipes as $pipe) {
                    if (is_resource($pipe)) {
                        fclose($pipe);
                    }
                }

                // Terminate the process.
                // Note: Use of SIGINT adds dependency on PCTNL extension so we
                // use the integer value instead.
                proc_terminate($this->resource, 2);

                $this->write('.');

                // Wait before checking again.
                sleep(1);
            }
        }
    }
914563
public function stop()
    {
        if ($this->isStarted()) {
            // trigger bbapplication.stop
            $this->getEventDispatcher()->dispatch('bbapplication.stop', new Event($this));
            $this->info('BackBee application ended');
        }
    }
232118
final public function shutdown() : void
    {
        $this->__call('shutdown');
        Master::wait($this->backend->process()->pid ?? -2);
    }
1270820
static public function stop()
    {
        if ( !self::$hasStarted )
        {
             return false;
        }
        session_write_close();
        self::$hasStarted = false;
        self::$handlerInstance = null;
        return true;
    }
1281597
public function shutdown()
    {
        foreach ($this->shutdown_functions as $function) {
            call_user_func($function);
        }

        // write session data as soon as possible and before
        // closing database connection, don't do this before
        // registered shutdown functions, they may need the session
        // Note: this will run registered gc handlers (ie. cache gc)
        if ($_SERVER['REMOTE_ADDR'] && is_object($this->session)) {
            $this->session->write_close();
        }

        if (is_object($this->smtp)) {
            $this->smtp->disconnect();
        }

        foreach ($this->caches as $cache) {
            if (is_object($cache)) {
                $cache->close();
            }
        }

        if (is_object($this->storage)) {
            $this->storage->close();
        }

        if ($this->config->get('log_driver') == 'syslog') {
            closelog();
        }
    }
1051252
public function shutdown()
	{
		$this->shutdown = true;
		$this->logger->log(Psr\Log\LogLevel::NOTICE, 'Shutting down');
	}
1007450
public function shutdownProcesses()
    {
        foreach ($this->processes as $pid => $process) {
            unset($this->processes[$pid]);
    
            posix_kill($pid, SIGUSR1);
        }
    
        exit;
    }
394010
public function destroy()
    {
        session_start();

        if(ini_get("session.use_cookies"))
        {
            $params = session_get_cookie_params();
            setcookie(session_name(),
                      '',
                      time() - 42000,
                      $params["path"],
                      $params["domain"],
                      $params["secure"],
                      $params["httponly"]
            );
        }

        session_unset();
        session_regenerate_id(true);
        session_destroy();
        session_write_close();
    }
912517
public function stop()
  {
    if(!$this->isRunning()) return;

    $this->data["runtime"] += microtime(TRUE) - $this->started;
    $this->data["realmem"] += memory_get_usage(TRUE) - $this->data["realmem_start"];
    $this->data["emalloc"] += memory_get_usage() - $this->data["emalloc_start"];

    $this->started = 0;
    $this->running = FALSE;
  }
500073
public static function shutdown()
    {
        self::$msgOutputLevel = Project::MSG_INFO;
        self::restoreIni();
        self::getTimer()->stop();
    }
764232
public function stop()
    {
        if (null === $this->sessionId) {
            throw new Exception("Session not started");
        }

        $this->doExecute('testComplete');
        $this->sessionId = null;
    }
1345352
public function stop()
    {
        if ($this->stopped) {
            return;
        }
        $this->stopped = true;
        if (in_array('one-by-one', $this->pollMode)) {
            $this->finish();
            return;
        }
        $this->appInstance->unsubscribeReal('s2c:' . $this->sessId, function ($redis) {
            $this->finish();
        });
    }
90927
public function stop()
    {
        if ($this->pid) {
            exec('kill ' . $this->pid, $output, $ret);
            if ($ret !== 0) {
                throw new Exception('Error stopping build-in server.');
            }
            $this->pid = null;
        }
    }
851542
public function close()
    {
        $this->started = false;
        
        \Wslim\Ioc::logger('session')->debug(sprintf('[%s]close', static::getId()));
    }
573557
public function stop()
    {
        try {
            $impersonated = $this->auth()->user();
            $impersonater = $this->findUserById($this->getImpersonatorId());

            $this->auth()->silentLogout();
            $this->auth()->silentLogin($impersonater);
            $this->clear();

            $this->events()->dispatch(
                new Events\ImpersonationStopped($impersonater, $impersonated)
            );

            return true;
        }
        catch (\Exception $e) {
            return false;
        }
    }
801750
public function kill_all_sessions() {
        global $DB;
        if (!$this->servers) {
            return;
        }

        // Go through the list of all servers because
        // we do not know where the session handler put the
        // data.

        $memcacheds = array();
        foreach ($this->servers as $server) {
            list($host, $port) = $server;
            $memcached = new \Memcached();
            $memcached->addServer($host, $port);
            $memcacheds[] = $memcached;
        }

        // Note: this can be significantly improved by fetching keys from memcached,
        //       but we need to make sure we are not deleting somebody else's sessions.

        $rs = $DB->get_recordset('sessions', array(), 'id DESC', 'id, sid');
        foreach ($rs as $record) {
            foreach ($memcacheds as $memcached) {
                $memcached->delete($this->prefix . $record->sid);
            }
        }
        $rs->close();

        foreach ($memcacheds as $memcached) {
            $memcached->quit();
        }
    }