Partially fixes PR38222
teemperor zturner stella.stamenova
- rGd75a8fff7f6f: Do not create new terminals when launching process on Windows with --no-stdio
rL342075: Do not create new terminals when launching process on Windows with --no-stdio
rLLDB342075: Do not create new terminals when launching process on Windows with --no-stdio
I think the issue here is that on windows we don't have the ability(*) to pipe stdio through lldb, so if you create a process without a console, you will not be able to use see it's output or pass it some input (probably fine for gui apps, but bad for console ones). This means your approach will also make things inconsistent with other platforms, only in a different way. (I don't really have an opinion which one is better/worse.)
(*) I think there is a way to emulate the unix pty behavior on windows, but it is not exactly straight-forward. It involves creating a hidden console and then polling that for changes/keypresses (I don't know the details, but that's how someone once explained it to me).
The other option is to only remove this flag if "--no-stdio" is set.
The best solution IMHO is:
- find a way to get stdio from a process and feed to to LLDB so it shows up when neither --tty nor --no-stdio is set
- when --tty is specified, set the CREATE_NEW_CONSOLE bit
- when --no-stdio is specified, don't get stdio from child process and don't set CREATE_NEW_CONSOLE