Terminate a running script.
187084
async def terminate(self):
        """"""
        # Workaround for pylint issue #1469
        # (https://github.com/PyCQA/pylint/issues/1469).
        cmd = await subprocess.create_subprocess_exec(  # pylint: disable=no-member
            *shlex.split('{} rm -f {}'.format(self.command, self._generate_container_name()))
        )
        await cmd.wait()
        await self.proc.wait()

        await super().terminate()
50778
def end(self):
        
        self._process.shutdown()
        self._roasting = False
        self._roast['date'] = now_date(str=True)
117300
def stop(self) -> None:
        """"""
        self._running = False
        if self._timeout is not None:
            self.io_loop.remove_timeout(self._timeout)
            self._timeout = None
580352
public function closeScript() {
    fclose($this->pipes[0]);
    fclose($this->pipes[1]);
    proc_close($this->checking_script_resource);
  }
660515
def _stop_process(p, name):
    """"""
    # Based on code in IPython.core.magics.script.ScriptMagics.shebang
    if p.poll() is not None:
        print("{} is already stopped.".format(name))
        return
    p.terminate()
    time.sleep(0.1)
    if p.poll() is not None:
        print("{} is terminated.".format(name))
        return
    p.kill()
    print("{} is killed.".format(name))
1079823
def signal_terminate(on_terminate):
    """"""
    for i in [signal.SIGINT, signal.SIGQUIT, signal.SIGUSR1, signal.SIGUSR2, signal.SIGTERM]:
        signal.signal(i, on_terminate)
179095
def stop_script(self, script_id):
        
        res = yield from self._pigpio_aio_command(_PI_CMD_PROCS, script_id, 0)
        return _u2i(res)
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='')
1296681
def stop_process(self, process, timeout=None):
        

        process["terminate"] = True
        if timeout is not None:
            process["terminate_at"] = time.time() + timeout
        process["subprocess"].send_signal(signal.SIGINT)
297323
function stop(opts, done) {
  debug('stopping...');

  killIfRunning(opts, function(err) {
    debug('Any running workers have been sent a stop command');
    done(err);
  });
}
847093
async def terminate(self) -> None:
        """"""
        await asyncio.sleep(config.shutdown_wait)
        # stop server and close loop if no more connection exists
        if not is_connected():
            stop_server(self.application.server)
            self.application.loop.stop()
151939
def close(self):
        '''
        '''
        if not self._process:
            return

        if self._process.returncode is not None:
            return

        _logger.debug('Terminate process.')

        try:
            self._process.terminate()
        except OSError as error:
            if error.errno != errno.ESRCH:
                raise

        for dummy in range(10):
            if self._process.returncode is not None:
                return

            time.sleep(0.05)

        _logger.debug('Failed to terminate. Killing.')

        try:
            self._process.kill()
        except OSError as error:
            if error.errno != errno.ESRCH:
                raise
745598
def terminate(self):
        """"""
        self.toggle_scan(False)
        self.keep_going = False
        self.join()
1028759
def Terminate(self, status=None):
    """"""
    try:
      self.queue_manager.DestroyFlowStates(self.session_id)
    except queue_manager.MoreDataException:
      pass

    # This flow might already not be running.
    if not self.IsRunning():
      return

    self._SendTerminationMessage(status=status)

    # Mark as terminated.
    self.context.state = rdf_flow_runner.FlowContext.State.TERMINATED
    self.flow_obj.Flush()
580967
def do_quit(self, arg):
        """"""
        if self.saved:
            self.save()
        else:
            self.parser.clean()
        return True
442570
async def close(self) -> None:
        """"""
        await self._execute(self._conn.close)
        self._running = False
        self._connection = None
729011
def terminate(self, reboot=False):
        """"""
        self.root.manage.manage = False
        self.root.mode = 'delete'
        self.root.init_boot = reboot
        self.client.set_profile(self.root.get_json())