The pseudo console in question is created using winapi::um::consoleapi::CreatePseudoConsole
I’ve tried determining if its waiting for input by scraping the output. But.. that is unreliable, to say the least.
I also tried seeing if the output pipe buffer is empty to determine if its waiting for input. But that is also unreliable, because when using yielding commands (such as ping
), the buffer will be empty for a bit because of latency.