The posix thread solution seems okay.
A quicker, easier solution might be to check the input
queue to see if anything's available.
This short example just increments a counter until
the user presses a 'q' and <enter>.
Normally, the input will be in "cooked" mode, so
whatever is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.