kbhit replacement example?

Can someone please send me an example of using tcischars to check for a
keyboard hit and then reading that character?
I have a test program running in a loop that I want to printf status info
when a key is pressed and exit if it’s an esc key. I need to be able to
ignore EINTR signals that are generated in response to a timer.


John Cockerham