On 8/3/2012 3:33 PM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
> Hi All,
> 
> I have a native Windows app that is run from bash (which is in turn run
> in a standard Cygwin terminal window, mintty).  The application's code uses
> kbhit() to check whether input is available from the user -- but it looks
> like kbhit() never indicates any input (when keys are getting pressed).
> The app works just fine if started directly from CMD.EXE.
> 
> Is that the expected behavior?

mintty is not a real Windows console, so programs that try to access the console
directly (like your kbhit-using program) won't work. Try running your program
under the "conin" program, or run bash inside a console window.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to