Detecting mintty terminal?

130 views
Skip to first unread message

paavo...@gmail.com

unread,
Jul 15, 2013, 8:34:15 AM7/15/13
to mintty-...@googlegroups.com

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

Reply all
Reply to author
Forward
0 new messages