Stop yielding readability events for `fd`.

        Redundant calls to :meth:`stop_receive` are silently ignored, this may
        change in future.
353885
def stop_receive(self, fd):
        
        self._rfds.pop(fd, None)
        self._update(fd)
578112
def _read(self, fd, mask):
        """"""
        try:
            # if EOF was encountered on a tty, avoid reading again because
            # it actually requests more data
            if select.select([fd],[],[],0)[0]:
                snew = os.read(fd, self.nbytes) # returns bytes in PY3K
                if PY3K: snew = snew.decode('ascii','replace')
                self.value.append(snew)
                self.nbytes -= len(snew)
            else:
                snew = ''
            if (self.nbytes <= 0 or len(snew) == 0) and self.widget:
                # stop the mainloop
                self.widget.quit()
        except OSError:
            raise IOError("Error reading from %s" % (fd,))
407684
def __stop_decoder(self):
        
        if self.__decoder_thread:
            self.__decoder_queue.put(None)
            self.__decoder_thread.join()
            self.__decoder_thread = None
604043
def resume_reading(self):
        

        # Clear the read pause status
        self._recv_paused = False

        # Call resume_reading() on the transport
        self._transport.resume_reading()

        # If there's data in the receive buffer, pass it on to the
        # client protocol
        if self._recv_buf:
            self.data_received(b'')
980810
def _on_process_stderr_ready(self):
        
        try:
            o = self.readAllStandardError()
        except (TypeError, RuntimeError):
            # widget already deleted
            return
        try:
            output = bytes(o).decode(self._encoding)
        except TypeError:
            output = bytes(o.data()).decode(self._encoding)
        for line in output.splitlines():
            self._srv_logger.error(line)
826666
def handle_read(self, *args, **kwargs):
        
        self.read_events()
        self.process_events()
        if self.handle_read_callback is not None:
            self.handle_read_callback(self)
841919
def remove_reader(self, fd):
        "  "
        h = msvcrt.get_osfhandle(fd)
        if h in self._read_fds:
            del self._read_fds[h]
1260671
def halt(self, request_type):
        
        try:
            if request_type & ch9.USB_DIR_IN:
                self.read(0)
            else:
                self.write(b'')
        except IOError as exc:
            if exc.errno != errno.EL2HLT:
                raise
        else:
            raise ValueError('halt did not return EL2HLT ?')
11145
def external_stop(self, force):
        

        # only the master processes handles the regular stop signal from the server, sending a SIGINT to
        # all its child (means to us, non-master process)
        if not self.is_master_process():
            if force:
                # make sure even the subprocess dies really on force
                os._exit(1)

            return

        self.logger.warning("Received stop signal by server.")
        if not self.stop_requested_force:
            self.stop_requested_force = force

        raise_sigint()
975009
def pipe_data_received(self, fd, data):
        """"""
        if fd == 2:  # stderr fd number
            self._on_stderr(data)
        elif self._on_data:
            self._on_data(data)
        else:
            self._queued_data.append(data)
800076
def checkSetReadOnly(fname, raiseOnErr = False):
    
    if os.access(fname, os.W_OK):
        # We can write to this but it is supposed to be read-only. Fix it.
        # Take away usr-write, leave group and other alone, though it
        # may be simpler to just force/set it to: r--r--r-- or r--------
        irafutils.setWritePrivs(fname, False, ignoreErrors= not raiseOnErr)
1304205
def suppress_interrupt():
    
    interrupted = False

    def sigint_handler(signum, frame):
        nonlocal interrupted
        interrupted = True
    
    s = signal.signal(signal.SIGINT, sigint_handler)
    try:
        yield None
    finally:
        signal.signal(signal.SIGINT, s)
    if interrupted:
        raise KeyboardInterrupt()
68228
def silence(self):
        

        sys.stdout = open(os.devnull, 'w')
        sys.stderr = open(os.devnull, 'w')
654112
def stop config={}
      @config.update(config).update(load_config)
      # @config = (config.empty?) ? load_config : config
      yield(self) if block_given?
      __stop! if respond_to?(:__stop!)
      pidfile = get_pidfile(@config)
      log 'No such process' and exit unless pidfile.pid
      begin
        log "Sending TERM signal to process #{pidfile.pid}"
        Process.kill("TERM", pidfile.pid)
      rescue
        log 'Could not find process'
      ensure
        pidfile.remove
      end
      
    end
28485
def _stop_transmit(self, stream):
        
        _vv and IOLOG.debug('%r._stop_transmit(%r)', self, stream)
        self.poller.stop_transmit(stream.transmit_side.fd)
447353
def _handle_readable(self, f):
        
        count = -1
        if isinstance(f, tuple):
            f, count = f
        handler = self._reads.pop(f, None)
        if handler is not None:
            handler(self, f, count=count)
898362
def remove_reader(socket)
      if event_mask_for_socket(socket) == ZMQ::POLLIN
        remove(socket)
        return
      end
      raise ArgumentError, "not registered for readability only: %p" % socket
    end