55377dfee2
On Windows there's something fundamentally broken about redirecting IO into a file and then restoring that said IO to it's original state. Even though no syscalls would fail, the output would sometimes either go into CLI or straight up nowhere. Simply using pipes instead of a temporary file magically resolves the above issue ¯\_(ツ)_/¯ Unfortunately the max pipe size on Linux is 1Mb, which is not enough to store all the data printed by the kernel. This leads to a softhang in vprintf(). Stick to using a temporary file on Linux, but switch to pipes on Windows. Slightly refactor the CaptureStream struct to accomadate this difference. Change-Id: Id8e68f150df47815a4f652ee2bcd6cfb7c3e3bac