I found
http://code.google.com/p/mintty/issues/detail?id=56 explaining why _isatty() does not work properly with mintty when used in non-Cygwin Windows console apps. I can understand that, but instead of _isatty(), what would be the best way to detect that the program is running in the mintty terminal (without redirection of stdin)?
(Background: I am maintaining an application which is basically similar to perl and can act bot in interactive and in pipeline modes. I could add a "-i" option for interactive mode, but maybe there is some way to automate this?)
TIA
Paavo