Psuedo terminal on Windows

Hi,

ProcessLaunchInfo seems to, unconditionally create a pseudo terminal if there's nothing attached to the stdout/stderr. This seems to end up calling posix_openpt, which is defined as:

inline int posix_openpt(int flag) { LLVM_BUILTIN_UNREACHABLE; }

for Windows.

This was fine a while ago so I'm wondering, what changed and how do I work around it?

This seemed to be caused by 278177 (done by zturner), and probably only hits when the host application is a gui app instead of a console application.

Ahh that explains why I didn’t notice it. Is the fix straightforward?

Sort of. it works if i (locally) do return 0, but that's doesn't seem to be the right thing to do.

The common thing to do on Windows is to let the program create a new window (flag in CreateProcess(Ex)), unless any of the 3 are reassigned, this would show a new cmd style window where stdin, stdout, stderr automatically go to, but that's quite a bit wrapped away from the point we call it, at least I coudln't find out how to do that.