Flush winpty-agent --show-input output

This is useful when winpty-agent is invoked from the Win32-OpenSSH server,
which uses a proper console for STDIN, but sockets(!) for STDOUT and
STDERR.  The C++ runtime uses block buffering on the socket output, so
flush explicitly.
This commit is contained in:
Ryan Prichard 2016-01-04 19:08:03 -06:00
parent eebc10bf36
commit 8292a8ef4f

View File

@ -200,6 +200,7 @@ void debugShowInput(bool enableMouse) {
} }
} }
std::cout << ss.str(); std::cout << ss.str();
std::cout.flush();
} }
SetConsoleMode(conin, origConsoleMode); SetConsoleMode(conin, origConsoleMode);
} }