On host controller reload, remove a not running server registered in the process controller declared as stopping.
165512
synchronized void setServerProcessStopping() {
        this.requiredState = InternalState.STOPPED;
        internalSetState(null, InternalState.STOPPED, InternalState.PROCESS_STOPPING);
    }
611266
def stop(name):
    '''
    
    '''
    vm_ = get_vm_info(name)
    machine = vm_['machine']

    cmd = 'vagrant halt {}'.format(machine)
    ret = __salt__['cmd.retcode'](cmd,
                                  runas=vm_.get('runas'),
                                  cwd=vm_.get('cwd'))
    return ret == 0
197138
def halt_running():
    ''''''
    vultr = Vultr(API_KEY)

    try:
            serverList = vultr.server.list()
            #logging.info('Listing servers:\n%s', dumps(
            #serverList, indent=2
        #))
    except VultrError as ex:
        logging.error('VultrError: %s', ex)

    for serverID in serverList:
        if serverList[serverID]['power_status'] == 'running':
            logging.info(serverList[serverID]['label'] + " will be gracefully shutdown.")
            vultr.server.halt(serverID)
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;
        }
    }
293605
def stop(self, host, port):
        

        args = {
            "host": host,
            "port": port,
        }
        self._rtinfo_stop_params_chk.check(args)

        return self._client.json("rtinfo.stop", args)
372319
public static void remove(ServiceController<?> controller) {
        try {
            transition(controller, State.REMOVED);
        } catch (StartException e) {
            // This can't happen
            throw new IllegalStateException(e);
        }
    }
660009
def server_shutdown(server_state):
    
    set_running( False )

    # stop API servers
    rpc_stop(server_state)
    api_stop(server_state)

    # stop atlas node
    server_atlas_shutdown(server_state)

    # stopping GC
    gc_stop()

    # clear PID file
    try:
        if os.path.exists(server_state['pid_file']):
            os.unlink(server_state['pid_file'])
    except:
        pass

    return True
458016
function Server_stop() {
  if (!this._wsStarted) throw Error("server not started")
  if (this._wsStopped) return

  this._wsStopped = true

  sessions.shutDown()
  this._wsServer.shutDown()

  this._wsServer.removeListener("request", this._onRequest)
  this._wsServer.removeListener("connect", onConnect)

  self._wsConfig  = null
  self._wsServer  = null
}
307338
def stop(ctx, service, editable):
    """"""
    logger.debug("running command %s (%s)", ctx.command.name, ctx.params,
                 extra={"command": ctx.command.name, "params": ctx.params})

    home = ctx.obj["HOME"]
    service_path = plugin_utils.get_plugin_path(home, SERVICES, service, editable)

    logger.debug("loading {}".format(service))
    service = register_service(service_path)

    try:
        with open(os.path.join(service_path, ARGS_JSON)) as f:
            service_args = json.loads(f.read())
    except IOError as exc:
        logger.debug(str(exc), exc_info=True)
        raise click.ClickException("Cannot load service args, are you sure server is running?")

    # get our service class instance
    service_module = get_service_module(service_path)
    service_obj = service_module.service_class(alert_types=service.alert_types, service_args=service_args)

    # prepare runner
    runner = myRunner(service_obj,
                      pidfile=service_path + ".pid",
                      stdout=open(os.path.join(service_path, "stdout.log"), "ab"),
                      stderr=open(os.path.join(service_path, "stderr.log"), "ab"))

    click.secho("[*] Stopping {}".format(service.name))
    try:
        runner._stop()
    except daemon.runner.DaemonRunnerStopFailureError as exc:
        logger.debug(str(exc), exc_info=True)
        raise click.ClickException("Unable to stop service, are you sure it is running?")
332079
def stop_service(conn, service='ceph'):
    
    if is_systemd(conn):
        # Without the check, an error is raised trying to stop an
        # already stopped service
        if is_systemd_service_active(conn, service):
            remoto.process.run(
                conn,
                [
                    'systemctl',
                    'stop',
                    '{service}'.format(service=service),
                ]
            )
310756
def stop(self):
        '''
        
        '''
        # avoid getting called twice
        self.cleanup()
        if self.running:
            self.running = False
            self.timer_stop.set()
            self.timer.join()
1275971
private boolean stopRejoiningHost() {

        // The host failure notification could come before mesh determination, wait for the determination
        try {
            m_meshDeterminationLatch.await();
        } catch (InterruptedException e) {
        }

        if (m_rejoining) {
            VoltDB.crashLocalVoltDB("Another node failed before this node could finish rejoining. " +
                    "As a result, the rejoin operation has been canceled. Please try again.");
            return true;
        }
        return false;
    }
1295053
synchronized void stop(Integer timeout) {
        final InternalState required = this.requiredState;
        if(required != InternalState.STOPPED) {
            this.requiredState = InternalState.STOPPED;
            ROOT_LOGGER.stoppingServer(serverName);
            // Only send the stop operation if the server is started
            if (internalState == InternalState.SERVER_STARTED) {
                internalSetState(new ServerStopTask(timeout), internalState, InternalState.PROCESS_STOPPING);
            } else {
                transition(false);
            }
        }
    }
1359633
public function cancel_process() {
        // Delete temporary restore course if exists.
        if ($this->controller->get_target() == backup::TARGET_NEW_COURSE) {
            $this->cleanup();
        }
        parent::cancel_process();
    }
528381
protected void stopProcessApplication(ProcessApplicationReference processApplicationReference) {

    try {
      // unless the user has overridden the stop behavior,
      // this causes the process application to remove its services
      // (triggers nested undeployment operation)
      ProcessApplicationInterface processApplication = processApplicationReference.getProcessApplication();
      processApplication.undeploy();
    }
    catch(Throwable t) {
      LOG.exceptionWhileStopping("Process Application", processApplicationReference.getName(), t);
    }

  }
635357
def stop_tracking_host(self):
        '''
            
        '''
        try:
            self.server.hosts.remove(self.client_address[0])
            if hasattr(self.server.module, 'on_shutdown'):
                self.server.module.on_shutdown(self.server.context, self.server.connection)
        except ValueError:
            pass
1060398
def _destroy_server(self, server_name):
        """"""
        try:
            del self.servers[server_name]
        except KeyError:
            pass

        if self.auto_close and not self.servers:
            loop.stop()