Non-blocking reads of terminal differ from S10XU8 and documentation
The attached test program should count up until a key is pressed. Then it counts down. Another key, counts up again. Ad nauseum. It works in Solaris 10 X86 Update 8. Not in OpenIndiana.
Trussing things shows that the Solaris read() returns -1 and errno==EAGAIN when there's nothing to read, as it should. Illumos just returns 0 in this case. 0 generally means end-of-file--there will be no more data at all.