Stop the logging child process.
766474
def stop_log_child(self):
        ''''''
        if self.log_fd:
            os.close(self.log_fd)
            self.log_fd = None
        if self.log_child:
            try:
                self.debug('children', 'stopping log child with pid {0}'
                           .format(self.log_child))
                os.kill(self.log_child, signal.SIGTERM)
                os.waitpid(self.log_child, 0)
            except OSError, e:
                if e.errno == errno.ESRCH or e.errno == errno.ECHILD:
                    # already gone
                    pass
                else:
                    raise
            self.log_child = None
1235523
public void stop()
    {
        try{if (_writer!=null)_writer.flush();} catch (IOException e){LogSupport.ignore(log,e);}
        if (_out!=null && _closeOut)
            try{_out.close();}catch(IOException e){LogSupport.ignore(log,e);}
        _out=null;
        _fileOut=null;
        _closeOut=false;
        _logDateCache=null;
        _writer=null;
    }
658984
def stop_subprocess(pid):
    """"""
    if hasattr(os, "kill"):
        import signal
        os.kill(pid, signal.SIGTERM)
    else:
        import win32api
        pid = win32api.OpenProcess(1, 0, pid)
        win32api.TerminateProcess(pid, 0)
    os.waitpid(pid, 0)
358896
def stop(self):
        """"""
        if self.zap_socket:
            self.log.debug(
                'Stopping ZAP at {}'.format(self.zap_socket.LAST_ENDPOINT))
            super().stop()
980745
def stop(self):
        
        # unsetup_fuse()
        self.fuse_process.teardown()
        for uuid in self.processes:
            self.processes[uuid].terminate()
436541
async def stop(self):
        """"""

        if self._rpc_task is not None:
            self._rpc_task.cancel()

        try:
            await self._rpc_task
        except asyncio.CancelledError:
            pass

        self._rpc_task = None
668908
def stop(self):
        

        if self.original_handler is not None:
            signal.signal(signal.SIGWINCH, self.original_handler)
562931
def start_log_child(self):
        ''''''
        self.stop_log_child()
        gconfig = yakonfig.get_global_config()
        read_end, write_end = os.pipe()
        pid = os.fork()
        if pid == 0:
            # We are the child
            self.clear_signal_handlers()
            os.close(write_end)
            yakonfig.clear_global_config()
            self.log_spewer(gconfig, read_end)
            sys.exit(0)
        else:
            # We are the parent
            self.debug('children', 'new log child with pid {0}'.format(pid))
            self.log_child = pid
            os.close(read_end)
            self.log_fd = write_end
386116
def stop(self):
        
        if self.log_file != PIPE and not (self.log_file == DEVNULL and _HAS_NATIVE_DEVNULL):
            try:
                self.log_file.close()
            except Exception:
                pass

        if self.process is None:
            return

        try:
            self.send_remote_shutdown_command()
        except TypeError:
            pass

        try:
            if self.process:
                for stream in [self.process.stdin,
                               self.process.stdout,
                               self.process.stderr]:
                    try:
                        stream.close()
                    except AttributeError:
                        pass
                self.process.terminate()
                self.process.wait()
                self.process.kill()
                self.process = None
        except OSError:
            pass
135493
def stop(self):
        """"""
        pid = None
        if os.path.exists(self.pidfile):
            with open(self.pidfile, 'r') as fp:
                pid = int(fp.read().strip())

        if not pid:
            msg = 'pidfile (%s) does not exist. Daemon not running?\n'
            sys.stderr.write(msg % self.pidfile)
            return

        try:
            while 1:
                os.kill(pid, SIGTERM)
                time.sleep(0.1)
        except OSError as e:
            e = str(e)
            if e.find('No such process') > 0:
                if os.path.exists(self.pidfile):
                    os.remove(self.pidfile)
                else:
                    print(e)
                    sys.exit(1)
867353
def stop(self):
        """"""
        LOG.info("Shutting down server")
        self.server.shutdown()
        LOG.debug("ServerThread.stop: Stopping ServerThread")
        self.server.server_close()
        LOG.info("Server stopped")
541033
def Stop(self):
    """"""
    self._Close()

    if self._rpc_thread.isAlive():
      self._rpc_thread.join()
    self._rpc_thread = None
718866
def stop(self):
        """"""
        if self.pidfile is None:
            raise DaemonError('Cannot stop daemon without PID file')

        pid = self._read_pidfile()
        if pid is None:
            # I don't think this should be a fatal error
            self._emit_warning('{prog} is not running'.format(prog=self.prog))
            return

        self._emit_message('Stopping {prog} ... '.format(prog=self.prog))

        try:
            # Try to terminate the process
            os.kill(pid, signal.SIGTERM)
        except OSError as ex:
            self._emit_failed()
            self._emit_error(str(ex))
            sys.exit(1)

        if self._pid_is_alive(pid, timeout=self.stop_timeout):
            # The process didn't terminate for some reason
            self._emit_failed()
            self._emit_error('Timed out while waiting for process (PID {pid}) '
                             'to terminate'.format(pid=pid))
            sys.exit(1)

        self._emit_ok()
727637
def stop(self) -> None:
        
        if self.is_running:
            if _logger is not None:
                self._log(INFO, "stop", __now=self.now())
            self._is_running = False
539482
def close(self, terminate=True, kill=False):
        '''
        
        '''
        if not self.closed:
            if self.child_fd is not None:
                os.close(self.child_fd)
                self.child_fd = None
            if self.child_fde is not None:
                os.close(self.child_fde)
                self.child_fde = None
            time.sleep(0.1)
            if terminate:
                if not self.terminate(kill):
                    raise TerminalException('Failed to terminate child process.')
            self.closed = True
1050891
public synchronized void stop()
    {
        _started=false;

        if (_out!=null)
        {
            try
            {
                if (_buffer.size()>0)
                {
                    _buffer.writeTo(_out);
                }
                _out.flush();
                _buffer=null;
            }
            catch(Exception e){if (_logImpl!=null && _logImpl.getDebug())e.printStackTrace();}
            Thread.yield();
        }
        
        if (_out!=null && _out!=LogStream.STDERR_STREAM)
        {
            try{_out.close();}
            catch(Exception e){if (_logImpl!=null && _logImpl.getDebug())e.printStackTrace();}
        }

        if (_filename!=null)
            _out=null;
    }
1091676
def stop(self):
        

        instance_status = Instance.InstanceStatus(status='Terminated')
        xml_content = instance_status.serialize()

        headers = {'Content-Type': 'application/xml'}
        self._client.put(self.resource(), xml_content, headers=headers)