Does its best to stop the process.
978980
def stop_process(process):
    """"""
    process.terminate()
    process.join(3)

    if process.is_alive() and os.name != 'nt':
        try:
            os.kill(process.pid, signal.SIGKILL)
            process.join()
        except OSError:
            return

    if process.is_alive():
        raise RuntimeError("Unable to terminate PID %d" % os.getpid())
954533
def stop(self):
        '''
        
        '''
        assert(self.model)
        assert(self.user_interface)
        assert(self.target)
        self.user_interface.stop()
        self.target.teardown()
        self.dataman.submit_task(None)
        self._un_set_signal_handler()
1209164
def stop(self, reason=None):
        """"""
        self.logger.info('stopping')
        self.loop.stop(pyev.EVBREAK_ALL)
793271
def stop(self):
        """"""

        msg = ''
        if self._process:
            _stop_process(self._process, 'Server process')
        else:
            msg += 'Server not started.\n'
        if msg:
            print(msg, end='')
1301082
void stop() {
    if (!shouldRun(conf)) {
      return;
    }
    nodeHealthScriptScheduler.cancel();
    if (shexec != null) {
      Process p = shexec.getProcess();
      if (p != null) {
        p.destroy();
      }
    }
  }
1351661
def stop(self):
        
        self._stop.set()
        if self._channel is not None:
            self._channel.close()
826070
def right_stop(self):
        """"""
        self.board.digital_write(R_CTRL_1, 0)
        self.board.digital_write(R_CTRL_2, 0)
        self.board.analog_write(PWM_R, 0)
50778
def end(self):
        
        self._process.shutdown()
        self._roasting = False
        self._roast['date'] = now_date(str=True)
1194787
protected function stopTerminatingProcessesThatAreHanging()
    {
        foreach ($this->terminatingProcesses as $process) {
            $timeout = $this->options->timeout;

            if ($process['terminatedAt']->addSeconds($timeout)->lte(Chronos::now())) {
                $process['process']->stop();
            }
        }
    }
1312192
def stop(self):
        
        self.stopped_by_interrupt = True

        if self.executor:
            self.executor.stop()
812641
def should_stop(self, result):
        """"""

        if result.get(DONE):
            return True

        for criteria, stop_value in self.stopping_criterion.items():
            if criteria not in result:
                raise TuneError(
                    "Stopping criteria {} not provided in result {}.".format(
                        criteria, result))
            if result[criteria] >= stop_value:
                return True

        return False
517760
public synchronized void stop() {
        try {
            this.kill();
        } finally {
            this.killed = false;
            this.restartCondition.setUseless(false);
            this.restartCondition.setActive(false);
        }

    }
37972
private function endProcess()
    {
        $arguments = $this->resolveProcessArgs();
        $name = sha1(serialize($arguments));
        if ($this->background->hasProcess($name)) {
            $this->background->getProcess($name)->stop();
            $this->background->removeProcess($name);
        }
    }
48039
def halt(self, message, emitter, *args, **kwargs):
        ''''''
        self.process_event((FINISH, self, (), {}))
        global_event_queue.clear()
877323
def stop(self):
        """"""
        with self.lock:
            self._message_received(ConnectionClosed(self._file, self))
1150979
def stop(self, check=True):
        
        if (check and self.countiter > 0 and self.opts['termination_callback'] and
                self.opts['termination_callback'] != str(self.opts['termination_callback'])):
            self.callbackstop = self.opts['termination_callback'](self)

        return self._stopdict(self, check)
452881
def stop(self):
        
        self._running = False
        if self._self_thread is not None:
            self._self_thread.cancel()
            self._self_thread = None