Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: Poll tty before selecting on Solaris



On Feb 14,  6:57pm, Peter Stephenson wrote:
}
} This extravaganza is necessary on Solaris when you use select() with the
} terminal and there is already typeahead --- it doesn't see it, you need
} to use a read with the termios poll mechanism.

It's been quite a while since I worked with Solaris, but I suspect this
has to do with the STREAMS-based tty driver.  Typeahead that has already
been buffered by the stream object is invisible to select().

There might be a tty mode setting to make the input stream unbuffered that
would avoid the need to poll().  Note this isn't related to stdio buffers,
so setbuf() et al. probably isn't going to have any effect on it.



Messages sorted by: Reverse Date, Date, Thread, Author