private static boolean poll()

in src/com/pty4j/unix/Pty.java [254:264]


  private static boolean poll(int pipeFd, int fd) {
    Pollfd[] poll_fds = new Pollfd[]{
      new Pollfd(pipeFd, CLibrary.POLLIN),
      new Pollfd(fd, CLibrary.POLLIN)
    };
    while (CLibrary.poll(poll_fds, -1) <= 0) {
      int errno = CLibrary.errno();
      if (errno != CLibrary.EAGAIN && errno != CLibrary.EINTR) return false;
    }
    return (poll_fds[1].getRevents() & CLibrary.POLLIN) != 0;
  }