On Sun, Nov 13, 2016 at 07:16:01AM +0100, Vincent Torri wrote:
> i still don't understand why not using GetConsoleMode() and see if it
> fails or not.
>
> if it fails : redirection is done with named pipes
Redirection is then done, but is it a file or mintty stdin ?
> if not : it's standard
i still don't understand why not using GetConsoleMode() and see if it
fails or not.
if it fails : redirection is done with named pipes
if not : it's standard win32 I/O
it's simple and works in my tests (DOS console, MSYS1, mintty, MSYS2
and cygwin terminal >= 1.8)
Vincent Torri
On Sun, Nov
Applications now could call iscygtty(STDIN_FILENO)
in order to detect whether they are running from
Cygwin/MSys terminal.
Without that, they have no choice but to think that
stdin is redirected from a named pipe.
Signed-off-by: Mihail Konev
Moved-from: