def read_from_fd(self):
        try:
            chunk = os.read(self.fd, self.read_chunk_size)
        except (__HOLE__, OSError) as e:
            if e.args[0] in (errno.EWOULDBLOCK, errno.EAGAIN):
                return None
            elif e.args[0] == errno.EBADF:
                # If the writing half of a pipe is closed, select will
                # report it as readable but reads will fail with EBADF.
                self.close(exc_info=True)
                return None
            else:
                raise
        if not chunk:
            self.close()
            return None
        return chunk
dataset/ETHPy150Open D-L/SimpleBookMarks/src/tornado/iostream.py/PipeIOStream.read_from_fd