pkg/term

Available() does not work on macos

Opened this issue · 0 comments

nicks commented

Available() delegates to TIocinq, which is stubbed out as a no-op.
https://github.com/pkg/term/blob/master/termios/termios_bsd.go#L81

Has anyone done evaluated what it would take to get it to work?

Seems like you might at least be able to do a select() call on the descriptor, to check if there's any data in the buffer (returning 1 or 0 would at least be marginally better than returning 0 all the time)