Stops the analysis processes.

    Args:
      abort (bool): True to indicated the stop is issued on abort.
197908
def _StopAnalysisProcesses(self, abort=False):
    
    logger.debug('Stopping analysis processes.')
    self._StopMonitoringProcesses()

    # Note that multiprocessing.Queue is very sensitive regarding
    # blocking on either a get or a put. So we try to prevent using
    # any blocking behavior.

    if abort:
      # Signal all the processes to abort.
      self._AbortTerminate()

    if not self._use_zeromq:
      logger.debug('Emptying queues.')
      for event_queue in self._event_queues.values():
        event_queue.Empty()

    # Wake the processes to make sure that they are not blocking
    # waiting for the queue new items.
    for event_queue in self._event_queues.values():
      event_queue.PushItem(plaso_queue.QueueAbort(), block=False)

    # Try waiting for the processes to exit normally.
    self._AbortJoin(timeout=self._PROCESS_JOIN_TIMEOUT)
    for event_queue in self._event_queues.values():
      event_queue.Close(abort=abort)

    if abort:
      # Kill any remaining processes.
      self._AbortKill()
    else:
      # Check if the processes are still alive and terminate them if necessary.
      self._AbortTerminate()
      self._AbortJoin(timeout=self._PROCESS_JOIN_TIMEOUT)

      for event_queue in self._event_queues.values():
        event_queue.Close(abort=True)
40513
function abortSignal(signal) {
    if (abortedFlags.get(signal) !== false) {
        return;
    }
    abortedFlags.set(signal, true);
    signal.dispatchEvent({ type: "abort" });
}
316354
async def stop(self):
        
        if self._association_state != self.State.CLOSED:
            await self._abort()
        self.__transport._unregister_data_receiver(self)
        self._set_state(self.State.CLOSED)
1194076
def config_stop(args):
    ''''''

    r = fapi.abort_submission(args.project, args.workspace,
                              args.submission_id)
    fapi._check_response_code(r, 204)

    return ("Aborted {0} in {1}/{2}".format(args.submission_id,
                                            args.project,
                                            args.workspace))
751957
public final boolean abort()
    {
        boolean ret = false;

        if (UserLoginModule.LOG.isDebugEnabled()) {
            UserLoginModule.LOG.debug("Abort of " + this.principal);
        }

        // If our authentication was successful, just return false
        if (this.principal != null) {

            // Clean up if overall authentication failed
            if (this.committed) {
                this.subject.getPrincipals().remove(this.principal);
            }
            this.committed = false;
            this.principal = null;
            ret = true;
        }
        return ret;
    }
426492
def stop(self, sig=None, timeout=10):
        
        if self.process is None:
            return self

        if sig is None:
            sig = self._sig_stop

        try:
            os.killpg(self.process.pid, sig)
        except OSError as err:
            if err.errno in IGNORED_ERROR_CODES:
                pass
            else:
                raise

        def process_stopped():
            """Return True only only when self.process is not running."""
            return self.running() is False

        self._set_timeout(timeout)
        try:
            self.wait_for(process_stopped)
        except TimeoutExpired:
            log.warning('Timeout expired, killing process', process=self)
            pass

        self._kill_all_kids(sig)
        self._clear_process()
        return self
1119707
public void stop() {
    if (stopRequested) {
      return;
    }
    stopRequested = true;
    running = false;
    if (server != null) server.stop();
    if (triggerThread != null) triggerThread.interrupt();
    if (fileFixer != null) fileFixer.shutdown();
    if (fileFixerThread != null) fileFixerThread.interrupt();
    if (myMetrics != null) {
      myMetrics.shutdown();
    }
  }
387169
public void abort()
    {
        /*
        do nothing if already rolledback
        */
        if (txStatus == Status.STATUS_NO_TRANSACTION
                || txStatus == Status.STATUS_UNKNOWN
                || txStatus == Status.STATUS_ROLLEDBACK)
        {
            log.info("Nothing to abort, tx is not active - status is " + TxUtil.getStatusString(txStatus));
            return;
        }
        // check status of tx
        if (txStatus != Status.STATUS_ACTIVE && txStatus != Status.STATUS_PREPARED &&
                txStatus != Status.STATUS_MARKED_ROLLBACK)
        {
            throw new IllegalStateException("Illegal state for abort call, state was '" + TxUtil.getStatusString(txStatus) + "'");
        }
        if(log.isEnabledFor(Logger.INFO))
        {
            log.info("Abort transaction was called on tx " + this);
        }
        try
        {
            try
            {
                doAbort();
            }
            catch(Exception e)
            {
                log.error("Error while abort transaction, will be skipped", e);
            }

            // used in managed environments, ignored in non-managed
            this.implementation.getTxManager().abortExternalTx(this);

            try
            {
                if(hasBroker() && getBroker().isInTransaction())
                {
                    getBroker().abortTransaction();
                }
            }
            catch(Exception e)
            {
                log.error("Error while do abort used broker instance, will be skipped", e);
            }
        }
        finally
        {
            txStatus = Status.STATUS_ROLLEDBACK;
            // cleanup things, e.g. release all locks
            doClose();
        }
    }
1010943
def stop(self):
        
        # Check that everything is running
        if not self._running:
            logging.warning('Colorized PhoXi not running. Aborting stop')
            return False

        self._webcam.stop()
        self._phoxi.stop()

        return True
18578
def stop(self):
        """"""
        if hasattr(self, 'process'):
            if self.process is not None:
                try:
                    is_running = self.process.poll() is None
                except AttributeError:
                    is_running = False

                if is_running:
                    self.bundle_engine.logline("Stopping {0}".format(self.service.name))
                    self.term_signal_sent = True

                    # Politely ask all child processes to die first
                    try:
                        for childproc in psutil.Process(self.process.pid).children(recursive=True):
                            childproc.send_signal(signal.SIGINT)
                    except psutil.NoSuchProcess:
                        pass
                    except AttributeError:
                        pass

                    try:
                        self.process.send_signal(self.service.stop_signal)
                    except OSError as e:
                        if e.errno == 3:        # No such process
                            pass
                else:
                    self.bundle_engine.warnline("{0} stopped prematurely.".format(self.service.name))
            else:
                self.bundle_engine.warnline("{0} stopped prematurely.".format(self.service.name))
        else:
            self.bundle_engine.warnline("{0} was never successfully started.".format(self.service.name))
862307
def stop(self):
        
        res = self.send_request('manager/stop', post=True)

        if res.status_code != 200:
            raise UnexpectedResponse(
                'Attempted to stop manager. {res_code}: {res_text}'.format(
                    res_code=res.status_code,
                    res_text=res.text,
                )
            )

        if settings.VERBOSITY >= verbosity.PROCESS_STOP:
            print('Stopped {}'.format(self.get_name()))

        # The request will end just before the process stops, so there is a tiny
        # possibility of a race condition. We delay as a precaution so that we
        # can be reasonably confident of the system's state.
        time.sleep(0.05)
1160395
def terminate(self, wait=False):
        """"""
        if self.proc is not None:
            self.proc.stdout.close()
            try:
                self.proc.terminate()
            except ProcessLookupError:
                pass
            if wait:
                self.proc.wait()
1353825
def external_aborted(self, params):
        
        self.ended = True
        self.running = False

        # When the server sends an abort signal, we really have to close immediately,
        # since for example the job has been already deleted.
        # without touching the git and client any further
        os._exit(1)
750869
def aborted(self, exc_info):
        
        self.exc_info = exc_info
        self.did_end = True
        self.write(format_exception(*self.exc_info))
1317893
def stop(self):
        
        # Check that everything is running
        if not self._running:
            logging.warning('Webcam not running. Aborting stop')
            return False

        if self._cap:
            self._cap.release()
            self._cap = None
        self._running = False

        return True
1113473
def stop(self, terminate=False):
        

        if not self.__online:
            raise foundations.exceptions.ServerOperationError(
                "{0} | '{1}' TCP Server is not online!".format(self.__class__.__name__, self))

        if not terminate:
            self.__server.shutdown()
        else:
            self.__server._BaseServer__shutdown_request = True

        self.__server = None
        self.__worker = None
        self.__online = False

        LOGGER.info("{0} | TCP Server successfully stopped!".format(self.__class__.__name__))
        return True
995512
def stop(self, timeout=None):
        

        self.stopping = True

        for process in list(self.processes):
            self.stop_process(process, timeout=timeout)